Skip to content

Commit

Permalink
Don't disable compiler warnings for Visual Studio
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
stweil committed May 3, 2018
1 parent fd5c93e commit c9b585c
Show file tree
Hide file tree
Showing 23 changed files with 1 addition and 94 deletions.
5 changes: 0 additions & 5 deletions src/ccmain/adaptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
*
**********************************************************************/

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#pragma warning(disable:4305) // int/float warnings
#endif

#ifdef __UNIX__
#include <assert.h>
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/ccmain/applybox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*
**********************************************************************/

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#include <ctype.h>
#include <string.h>
#ifdef __UNIX__
Expand Down
4 changes: 0 additions & 4 deletions src/ccmain/docqual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*
**********************************************************************/

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#include <ctype.h>
#include "docqual.h"
#include "reject.h"
Expand Down
4 changes: 0 additions & 4 deletions src/ccmain/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*
**********************************************************************/

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#include <string.h>
#include <ctype.h>
#ifdef __UNIX__
Expand Down
3 changes: 0 additions & 3 deletions src/ccmain/pagesegmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
#else
#include <unistd.h>
#endif // _WIN32
#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

// Include automatically generated configuration file if running autoconf.
#ifdef HAVE_CONFIG_H
Expand Down
4 changes: 0 additions & 4 deletions src/ccmain/pgedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*
**********************************************************************/

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

// Include automatically generated configuration file if running autoconf.
#ifdef HAVE_CONFIG_H
#include "config_auto.h"
Expand Down
5 changes: 0 additions & 5 deletions src/ccmain/reject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
*
**********************************************************************/

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#pragma warning(disable:4305) // int/float warnings
#endif

#include "tessvars.h"
#ifdef __UNIX__
#include <assert.h>
Expand Down
4 changes: 0 additions & 4 deletions src/ccmain/tessbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*
**********************************************************************/

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#include "mfoutline.h"
#include "tessbox.h"
#include "tesseractclass.h"
Expand Down
6 changes: 0 additions & 6 deletions src/ccmain/tfacepp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 "blamer.h"
Expand Down
4 changes: 0 additions & 4 deletions src/ccutil/tessdatamanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
//
///////////////////////////////////////////////////////////////////////

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/dict/dawg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
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 "cutil.h"
Expand Down
3 changes: 0 additions & 3 deletions src/dict/dict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#include "dict.h"
#include "unicodes.h"

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif
#include "tprintf.h"

namespace tesseract {
Expand Down
5 changes: 0 additions & 5 deletions src/dict/stopper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
#include "scanutils.h"
#include "unichar.h"

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#pragma warning(disable:4800) // int/bool warnings
#endif

/*----------------------------------------------------------------------------
Private Code
----------------------------------------------------------------------------*/
Expand Down
5 changes: 1 addition & 4 deletions src/dict/trie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
/*----------------------------------------------------------------------
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 "callcpp.h"
Expand Down
4 changes: 0 additions & 4 deletions src/textord/colfind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
//
///////////////////////////////////////////////////////////////////////

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

// Include automatically generated configuration file if running autoconf.
#ifdef HAVE_CONFIG_H
#include "config_auto.h"
Expand Down
4 changes: 0 additions & 4 deletions src/textord/colpartition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
//
///////////////////////////////////////////////////////////////////////

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/textord/imagefind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
//
///////////////////////////////////////////////////////////////////////

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/textord/linefind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
//
///////////////////////////////////////////////////////////////////////

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/textord/strokewidth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
//
///////////////////////////////////////////////////////////////////////

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/textord/tablefind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
//
///////////////////////////////////////////////////////////////////////

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/textord/tabvector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
//
///////////////////////////////////////////////////////////////////////

#ifdef _MSC_VER
#pragma warning(disable:4244) // Conversion warnings
#endif

#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#endif
Expand Down
6 changes: 0 additions & 6 deletions src/viewer/scrollview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@

#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 kMaxMsgSize = 4096;
const int kMaxIntPairSize = 45; // Holds %d,%d, for up to 64 bit.
Expand Down
1 change: 0 additions & 1 deletion src/viewer/svutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
#pragma warning(disable:4786)
#else
#include "platform.h"
#include <windows.h>
Expand Down

0 comments on commit c9b585c

Please sign in to comment.