From 9df999154c42155aa521a800748cdd8fe19af6a5 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sun, 12 Jun 2011 20:29:50 +0000 Subject: [PATCH] fixed a few warnings and bugs, including ticket #1079 --- modules/core/src/system.cpp | 2 +- modules/objdetect/src/_lsvm_tbbversion.h | 1 - modules/objdetect/src/lsvmtbbversion.cpp | 2 ++ modules/python/src1/gen.py | 2 +- modules/ts/include/opencv2/ts/ts.hpp | 2 +- samples/cpp/letter_recog.cpp | 2 +- samples/gpu/cascadeclassifier_nvidia_api.cpp | 2 ++ 7 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index e4cb15c..bdd44d2 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -72,7 +72,7 @@ #include #include -#ifdef __MACH__ && defined __APPLE__ +#if defined __MACH__ && defined __APPLE__ #include #include #endif diff --git a/modules/objdetect/src/_lsvm_tbbversion.h b/modules/objdetect/src/_lsvm_tbbversion.h index 1df210b..6619bcb 100644 --- a/modules/objdetect/src/_lsvm_tbbversion.h +++ b/modules/objdetect/src/_lsvm_tbbversion.h @@ -2,7 +2,6 @@ #define _LSVM_TBBVERSION_H #include "_lsvm_matching.h" -#include "precomp.hpp" /* // Computation score function using TBB tasks diff --git a/modules/objdetect/src/lsvmtbbversion.cpp b/modules/objdetect/src/lsvmtbbversion.cpp index d22a17f..bac48ac 100644 --- a/modules/objdetect/src/lsvmtbbversion.cpp +++ b/modules/objdetect/src/lsvmtbbversion.cpp @@ -1,3 +1,5 @@ +#include "precomp.hpp" + #ifdef HAVE_TBB #include "_lsvm_tbbversion.h" diff --git a/modules/python/src1/gen.py b/modules/python/src1/gen.py index 1080a58..d9bed76 100644 --- a/modules/python/src1/gen.py +++ b/modules/python/src1/gen.py @@ -325,7 +325,7 @@ for nm,args,ty,flags in sorted(api): ds_args += o2s(optional) ds = "%s(%s) -> %s" % (nm, ds_args, str(ty)) - print ds + #print ds if has_optional(args): entry = '{"%%s", (PyCFunction)pycv%s, METH_KEYWORDS, "%s"},' % (cname(nm), ds) diff --git a/modules/ts/include/opencv2/ts/ts.hpp b/modules/ts/include/opencv2/ts/ts.hpp index 3af8bf9..056e34c 100644 --- a/modules/ts/include/opencv2/ts/ts.hpp +++ b/modules/ts/include/opencv2/ts/ts.hpp @@ -5,7 +5,7 @@ #define GTEST_LINKED_AS_SHARED_LIBRARY 1 #endif -#include // for va_list +#include // for va_list #include "opencv2/ts/ts_gtest.h" #include "opencv2/core/core.hpp" diff --git a/samples/cpp/letter_recog.cpp b/samples/cpp/letter_recog.cpp index 9dd072b..0c98fff 100644 --- a/samples/cpp/letter_recog.cpp +++ b/samples/cpp/letter_recog.cpp @@ -610,7 +610,7 @@ int build_nbayes_classifier( char* data_filename ) true_results[j - ntrain_samples] = responses->data.fl[j]; } CvMat *result = cvCreateMat(1, nsamples_all - ntrain_samples, CV_32FC1); - (int)nbayes.predict(&sample, result); + nbayes.predict(&sample, result); int true_resp = 0; //int accuracy = 0; for (int i = 0; i < nsamples_all - ntrain_samples; i++) diff --git a/samples/gpu/cascadeclassifier_nvidia_api.cpp b/samples/gpu/cascadeclassifier_nvidia_api.cpp index 7c2f57b..b33b447 100644 --- a/samples/gpu/cascadeclassifier_nvidia_api.cpp +++ b/samples/gpu/cascadeclassifier_nvidia_api.cpp @@ -1,4 +1,6 @@ +#if _MSC_VER >= 1400 #pragma warning( disable : 4201 4408 4127 4100) +#endif #include "cvconfig.h" #include -- 2.7.4