diff --git a/cfg/gnu.cfg b/cfg/gnu.cfg index 2c8d5dbe6..9b62d06da 100644 --- a/cfg/gnu.cfg +++ b/cfg/gnu.cfg @@ -126,7 +126,7 @@ - + false diff --git a/cfg/windows.cfg b/cfg/windows.cfg index b040eefb9..ae2dc9224 100644 --- a/cfg/windows.cfg +++ b/cfg/windows.cfg @@ -1444,9 +1444,27 @@ + + false + + + + + + false + + + + + + + + + + diff --git a/test/cfg/runtests.sh b/test/cfg/runtests.sh index 504d43aab..ad3df9132 100755 --- a/test/cfg/runtests.sh +++ b/test/cfg/runtests.sh @@ -17,6 +17,10 @@ ${CPPCHECK} --check-library --library=posix --enable=information --enable=style gcc -fsyntax-only -D_GNU_SOURCE ${DIR}gnu.c ${CPPCHECK} --check-library --library=gnu --enable=information --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr ${DIR}gnu.c +# windows.cpp +#g++ -fsyntax-only ${DIR}windows.cpp +${CPPCHECK} --check-library --library=windows --enable=information --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr ${DIR}windows.cpp + # std.c gcc -fsyntax-only ${DIR}std.c ${CPPCHECK} --check-library --enable=information --error-exitcode=1 --enable=style --suppress=missingIncludeSystem --inline-suppr ${DIR}std.c diff --git a/test/cfg/windows.cpp b/test/cfg/windows.cpp new file mode 100644 index 000000000..c0be84b5d --- /dev/null +++ b/test/cfg/windows.cpp @@ -0,0 +1,18 @@ +// Test library configuration for windows.cfg +// +// Usage: +// $ cppcheck --check-library --library=windows --enable=information --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/windows.cpp +// => +// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0 +// + +class CSharedFilesCtrl { + void OpenFile(const CShareableFile* file); + afx_msg void OnNmDblClk(NMHDR *pNMHDR, LRESULT *pResult); + +}; + +void CSharedFilesCtrl::OnNmDblClk(NMHDR* /*pNMHDR*/, LRESULT* pResult) { + if (file) + OpenFile(file); +} diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 2b454da1b..84b06e6ac 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -87,10 +87,11 @@ static void compilefiles(std::ostream &fout, const std::vector &fil } } -static void getCppFiles(std::vector &files, const std::string &path) +static void getCppFiles(std::vector &files, const std::string &path, bool recursive) { std::map filemap; - FileLister::recursiveAddFiles(filemap, path); + const std::set extra; + FileLister::addFiles(filemap, path, extra, recursive); // add *.cpp files to the "files" vector.. for (std::map::const_iterator it = filemap.begin(); it != filemap.end(); ++it) { @@ -153,16 +154,16 @@ int main(int argc, char **argv) // Get files.. std::vector libfiles; - getCppFiles(libfiles, "lib/"); + getCppFiles(libfiles, "lib/", false); std::vector clifiles; - getCppFiles(clifiles, "cli/"); + getCppFiles(clifiles, "cli/", false); std::vector testfiles; - getCppFiles(testfiles, "test/"); + getCppFiles(testfiles, "test/", false); std::vector toolsfiles; - getCppFiles(toolsfiles, "tools/"); + getCppFiles(toolsfiles, "tools/", false); if (libfiles.empty() && clifiles.empty() && testfiles.empty()) { std::cerr << "No files found. Are you in the correct directory?" << std::endl; @@ -170,7 +171,7 @@ int main(int argc, char **argv) } std::vector externalfiles; - getCppFiles(externalfiles, "externals/"); + getCppFiles(externalfiles, "externals/", true); // QMAKE - lib/lib.pri