mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-13 16:09:04 +08:00
Don't disable compiler warnings for Visual Studio
It's still possible to set the warning level in the project settings, but single source files should normally not disable compiler warnings. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
fd5c93e667
commit
c9b585cfc5
@ -18,11 +18,6 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#pragma warning(disable:4305) // int/float warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "docqual.h"
|
#include "docqual.h"
|
||||||
#include "reject.h"
|
#include "reject.h"
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
|
@ -24,9 +24,6 @@
|
|||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Include automatically generated configuration file if running autoconf.
|
// Include automatically generated configuration file if running autoconf.
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Include automatically generated configuration file if running autoconf.
|
// Include automatically generated configuration file if running autoconf.
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
|
@ -17,11 +17,6 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#pragma warning(disable:4305) // int/float warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "tessvars.h"
|
#include "tessvars.h"
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "mfoutline.h"
|
#include "mfoutline.h"
|
||||||
#include "tessbox.h"
|
#include "tessbox.h"
|
||||||
#include "tesseractclass.h"
|
#include "tesseractclass.h"
|
||||||
|
@ -17,12 +17,6 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#pragma warning(disable:4305) // int/float warnings
|
|
||||||
#pragma warning(disable:4800) // int/bool warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "blamer.h"
|
#include "blamer.h"
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,10 +26,6 @@
|
|||||||
I n c l u d e s
|
I n c l u d e s
|
||||||
----------------------------------------------------------------------*/
|
----------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#pragma warning(disable:4800) // int/bool warnings
|
|
||||||
#endif
|
|
||||||
#include "dawg.h"
|
#include "dawg.h"
|
||||||
|
|
||||||
#include "cutil.h"
|
#include "cutil.h"
|
||||||
|
@ -21,9 +21,6 @@
|
|||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
#include "unicodes.h"
|
#include "unicodes.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
#include "tprintf.h"
|
#include "tprintf.h"
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
@ -36,11 +36,6 @@
|
|||||||
#include "scanutils.h"
|
#include "scanutils.h"
|
||||||
#include "unichar.h"
|
#include "unichar.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#pragma warning(disable:4800) // int/bool warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
Private Code
|
Private Code
|
||||||
----------------------------------------------------------------------------*/
|
----------------------------------------------------------------------------*/
|
||||||
|
@ -25,10 +25,7 @@
|
|||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
I n c l u d e s
|
I n c l u d e s
|
||||||
----------------------------------------------------------------------*/
|
----------------------------------------------------------------------*/
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#pragma warning(disable:4800) // int/bool warnings
|
|
||||||
#endif
|
|
||||||
#include "trie.h"
|
#include "trie.h"
|
||||||
|
|
||||||
#include "callcpp.h"
|
#include "callcpp.h"
|
||||||
|
@ -18,10 +18,6 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Include automatically generated configuration file if running autoconf.
|
// Include automatically generated configuration file if running autoconf.
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
|
@ -18,10 +18,6 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,10 +18,6 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,10 +18,6 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable:4244) // Conversion warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config_auto.h"
|
#include "config_auto.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -36,12 +36,6 @@
|
|||||||
|
|
||||||
#include "scrollview.h"
|
#include "scrollview.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(disable : 4786) // Don't give irrelevant warnings for stl
|
|
||||||
#pragma warning(disable : 4018) // signed/unsigned warnings
|
|
||||||
#pragma warning(disable : 4530) // exception warnings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const int kSvPort = 8461;
|
const int kSvPort = 8461;
|
||||||
const int kMaxMsgSize = 4096;
|
const int kMaxMsgSize = 4096;
|
||||||
const int kMaxIntPairSize = 45; // Holds %d,%d, for up to 64 bit.
|
const int kMaxIntPairSize = 45; // Holds %d,%d, for up to 64 bit.
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#endif
|
#endif
|
||||||
#pragma warning(disable:4786)
|
|
||||||
#else
|
#else
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user