2011-01-14 10:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/config/beos/gcc.mk
  * harbour/config/qnx/gcc.mk
  * harbour/config/bsd/gcc.mk
  * harbour/config/wce/mingwarm.mk
  * harbour/config/vxworks/gcc.mk
  * harbour/config/hpux/gcc.mk
  * harbour/config/darwin/gcc.mk
  * harbour/config/dos/djgpp.mk
  * harbour/config/win/mingw.mk
  * harbour/config/linux/gcc.mk
  * harbour/config/cygwin/gcc.mk
  * harbour/config/symbian/gcc.mk
  * harbour/config/os2/gcc.mk
  * harbour/config/sunos/gcc.mk
    * use -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized
          -Wno-switch -Wno-strict-overflow -Wno-main
      instead of -W when warnings are not enabled with GCC based compilers.
      Using only -W only is rather useless because this switch enables
      warnings which can be usually ignored in 3-rd party code.
      This modification should help in locating bugs introduced by us
      to 3-rd party code, i.e. due to wrong header files used on some
      platforms (we do not use autoconf assuming some default settings
      what can be wrong in some cases). It should also not hide some
      important/critical bugs in 3-rd party code.
      This modification pacifies some common warnings which can be
      ignored usually but it also enables some more important ones.
      If it's necessary then we can tune it a little bit more and disable
      some other warnings too.
      It's possible that on some platforms using very old GCC versions
      some of -W* switches are not supported - please make tests and
      inform us about problems.

  * harbour/utils/hbmk2/hbmk2.prg
    * use -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized
          -Wno-switch -Wno-strict-overflow -Wno-main
      instead of -W when warning level is set to low with GCC based
      compilers
This commit is contained in:
Przemyslaw Czerpak
2011-01-14 09:13:06 +00:00
parent 6697ddd6f6
commit 7941a797a7
16 changed files with 57 additions and 18 deletions

View File

@@ -16,6 +16,45 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-01-14 10:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/beos/gcc.mk
* harbour/config/qnx/gcc.mk
* harbour/config/bsd/gcc.mk
* harbour/config/wce/mingwarm.mk
* harbour/config/vxworks/gcc.mk
* harbour/config/hpux/gcc.mk
* harbour/config/darwin/gcc.mk
* harbour/config/dos/djgpp.mk
* harbour/config/win/mingw.mk
* harbour/config/linux/gcc.mk
* harbour/config/cygwin/gcc.mk
* harbour/config/symbian/gcc.mk
* harbour/config/os2/gcc.mk
* harbour/config/sunos/gcc.mk
* use -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized
-Wno-switch -Wno-strict-overflow -Wno-main
instead of -W when warnings are not enabled with GCC based compilers.
Using only -W only is rather useless because this switch enables
warnings which can be usually ignored in 3-rd party code.
This modification should help in locating bugs introduced by us
to 3-rd party code, i.e. due to wrong header files used on some
platforms (we do not use autoconf assuming some default settings
what can be wrong in some cases). It should also not hide some
important/critical bugs in 3-rd party code.
This modification pacifies some common warnings which can be
ignored usually but it also enables some more important ones.
If it's necessary then we can tune it a little bit more and disable
some other warnings too.
It's possible that on some platforms using very old GCC versions
some of -W* switches are not supported - please make tests and
inform us about problems.
* harbour/utils/hbmk2/hbmk2.prg
* use -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized
-Wno-switch -Wno-strict-overflow -Wno-main
instead of -W when warning level is set to low with GCC based
compilers
2011-01-14 08:35 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbdefs.h
* use native stdint.h for MSVC 2010. Patch by Andi, thx.

View File

@@ -23,7 +23,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -21,7 +21,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -31,7 +31,7 @@ CFLAGS += -fno-common
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -22,7 +22,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -27,7 +27,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -30,7 +30,7 @@ endif
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -35,7 +35,7 @@ CFLAGS += -D_C99 -D_HAS_C9X
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -21,7 +21,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -36,7 +36,7 @@ endif
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
endif
ifneq ($(HB_BUILD_OPTIM),no)

View File

@@ -3181,7 +3181,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
SWITCH hbmk[ _HBMK_nWARN ]
CASE _WARN_MAX ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall -pedantic" ) ; EXIT
CASE _WARN_YES ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall" ) ; EXIT
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-W" ) ; EXIT
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main" ) ; EXIT
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "-w" ) ; EXIT
ENDSWITCH
ENDIF
@@ -3427,7 +3427,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
SWITCH hbmk[ _HBMK_nWARN ]
CASE _WARN_MAX ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall -pedantic" ) ; EXIT
CASE _WARN_YES ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall" ) ; EXIT
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-W" ) ; EXIT
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main" ) ; EXIT
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "-w" ) ; EXIT
ENDSWITCH
cOpt_CompC += " {FC}"
@@ -3561,7 +3561,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
SWITCH hbmk[ _HBMK_nWARN ]
CASE _WARN_MAX ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall -pedantic" ) ; EXIT
CASE _WARN_YES ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall" ) ; EXIT
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-W" ) ; EXIT
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main" ) ; EXIT
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "-w" ) ; EXIT
ENDSWITCH
cOpt_CompC += " {FC}"
@@ -3669,7 +3669,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
SWITCH hbmk[ _HBMK_nWARN ]
CASE _WARN_MAX ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall -pedantic" ) ; EXIT
CASE _WARN_YES ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall" ) ; EXIT
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-W" ) ; EXIT
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main" ) ; EXIT
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "-w" ) ; EXIT
ENDSWITCH
cOpt_CompC += " {FC}"