fixed #2297, #2300; fixed several warnings

This commit is contained in:
Vadim Pisarevsky
2012-08-28 13:45:35 +04:00
parent 95d54196db
commit 0bd68a70f1
12 changed files with 27 additions and 22 deletions

View File

@@ -861,7 +861,7 @@ cvCreateData( CvArr* arr )
if( CV_IS_MAT_CONT( mat->type ))
{
total_size = (size_t)mat->dim[0].size*(mat->dim[0].step != 0 ?
mat->dim[0].step : total_size);
(size_t)mat->dim[0].step : total_size);
}
else
{

View File

@@ -7,7 +7,8 @@ using namespace std;
using namespace cv;
namespace {
void helpParser()
#if 0
static void helpParser()
{
printf("\nThe CommandLineParser class is designed for command line arguments parsing\n"
"Keys map: \n"
@@ -50,6 +51,7 @@ void helpParser()
" It also works with 'unsigned int', 'double', and 'float' types \n"
);
}
#endif
vector<string> split_string(const string& str, const string& delimiters)
{

View File

@@ -113,13 +113,13 @@ namespace
const CvOpenGlFuncTab* g_glFuncTab = 0;
//#ifdef HAVE_CUDA
#if defined HAVE_CUDA || defined HAVE_OPENGL
const CvOpenGlFuncTab* glFuncTab()
{
static EmptyGlFuncTab empty;
return g_glFuncTab ? g_glFuncTab : &empty;
}
//#endif
#endif
}
CvOpenGlFuncTab::~CvOpenGlFuncTab()

View File

@@ -2793,7 +2793,7 @@ cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, co
fs->buffer_end = fs->buffer_start + buf_size;
if( fs->fmt == CV_STORAGE_FORMAT_XML )
{
size_t file_size = fs->file ? ftell( fs->file ) : (size_t)0;
size_t file_size = fs->file ? (size_t)ftell( fs->file ) : (size_t)0;
fs->strstorage = cvCreateChildMemStorage( fs->memstorage );
if( !append || file_size == 0 )
{