/ Check-in [6a378c29]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add an option to the MSVC makefile to enable treating warnings as errors.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6a378c29b43d61313ca9daa599e59d8eeeed9a27
User & Date: mistachkin 2017-02-01 22:32:49
Context
2017-02-01
22:59
Fix C99-style variable declaration issue seen with older versions of MSVC. check-in: 54d28546 user: mistachkin tags: trunk
22:43
Fix harmless compiler warnings seen with MSVC. Closed-Leaf check-in: 997f765b user: mistachkin tags: msvcWarn
22:32
Add an option to the MSVC makefile to enable treating warnings as errors. check-in: 6a378c29 user: mistachkin tags: trunk
17:08
Unwind the RTREE dimension loop inside of rtreeCallbackConstraint(). check-in: 4854ea9c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.msc.

    19     19   # <</mark>>
    20     20   
    21     21   # Set this non-0 to enable full warnings (-W4, etc) when compiling.
    22     22   #
    23     23   !IFNDEF USE_FULLWARN
    24     24   USE_FULLWARN = 0
    25     25   !ENDIF
           26  +
           27  +# Set this non-0 to enable treating warnings as errors (-WX, etc) when
           28  +# compiling.
           29  +#
           30  +!IFNDEF USE_FATAL_WARN
           31  +USE_FATAL_WARN = 0
           32  +!ENDIF
    26     33   
    27     34   # Set this non-0 to enable full runtime error checks (-RTC1, etc).  This
    28     35   # has no effect if (any) optimizations are enabled.
    29     36   #
    30     37   !IFNDEF USE_RUNTIME_CHECKS
    31     38   USE_RUNTIME_CHECKS = 0
    32     39   !ENDIF
................................................................................
   488    495   # same unless your are cross-compiling.)
   489    496   #
   490    497   !IF $(USE_FULLWARN)!=0
   491    498   TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
   492    499   !ELSE
   493    500   TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
   494    501   !ENDIF
          502  +
          503  +# Check if warnings should be treated as errors when compiling.
          504  +#
          505  +!IF $(USE_FATAL_WARN)!=0
          506  +TCC = $(TCC) -WX
          507  +!ENDIF
   495    508   
   496    509   TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
   497    510   RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
   498    511   
   499    512   # Check if we want to use the "stdcall" calling convention when compiling.
   500    513   # This is not supported by the compilers for non-x86 platforms.  It should
   501    514   # also be noted here that building any target with these "stdcall" options

Changes to autoconf/Makefile.msc.

    19     19   
    20     20   
    21     21   # Set this non-0 to enable full warnings (-W4, etc) when compiling.
    22     22   #
    23     23   !IFNDEF USE_FULLWARN
    24     24   USE_FULLWARN = 0
    25     25   !ENDIF
           26  +
           27  +# Set this non-0 to enable treating warnings as errors (-WX, etc) when
           28  +# compiling.
           29  +#
           30  +!IFNDEF USE_FATAL_WARN
           31  +USE_FATAL_WARN = 0
           32  +!ENDIF
    26     33   
    27     34   # Set this non-0 to enable full runtime error checks (-RTC1, etc).  This
    28     35   # has no effect if (any) optimizations are enabled.
    29     36   #
    30     37   !IFNDEF USE_RUNTIME_CHECKS
    31     38   USE_RUNTIME_CHECKS = 0
    32     39   !ENDIF
................................................................................
   449    456   # same unless your are cross-compiling.)
   450    457   #
   451    458   !IF $(USE_FULLWARN)!=0
   452    459   TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
   453    460   !ELSE
   454    461   TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
   455    462   !ENDIF
          463  +
          464  +# Check if warnings should be treated as errors when compiling.
          465  +#
          466  +!IF $(USE_FATAL_WARN)!=0
          467  +TCC = $(TCC) -WX
          468  +!ENDIF
   456    469   
   457    470   TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -fp:precise
   458    471   RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) $(RCOPTS) $(RCCOPTS)
   459    472   
   460    473   # Check if we want to use the "stdcall" calling convention when compiling.
   461    474   # This is not supported by the compilers for non-x86 platforms.  It should
   462    475   # also be noted here that building any target with these "stdcall" options