Fixed gcc build warning
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Mon, 20 Aug 2012 15:51:19 +0000 (19:51 +0400)
committerAndrey Kamaev <andrey.kamaev@itseez.com>
Mon, 20 Aug 2012 15:53:03 +0000 (19:53 +0400)
modules/objdetect/src/hog.cpp

index 19decfb..21bda24 100644 (file)
@@ -2601,7 +2601,7 @@ void HOGDescriptor::readALTModel(std::string modelfile)
        double *linearwt = new double[totwords+1];
        int length = totwords;
        nread = fread(linearwt, sizeof(double), totwords + 1, modelfl);
-       if(nread != length + 1)
+       if(nread != static_cast<size_t>(length) + 1)
            throw Exception();
 
        for(int i = 0; i < length; i++)