Merge branch 'martin-t/warns' into 'master'
authorMario <zacjardine@y7mail.com>
Mon, 12 Feb 2018 05:28:56 +0000 (05:28 +0000)
committerMario <zacjardine@y7mail.com>
Mon, 12 Feb 2018 05:28:56 +0000 (05:28 +0000)
A somewhat hidden option to allow warnings when debugging (small MR)

See merge request xonotic/xonotic-data.pk3dir!475

1  2 
qcsrc/Makefile

diff --combined qcsrc/Makefile
index bfea08b5f92df070fbcc59269b5ec65ed7bb3162,2941f6320692a46f7932af0e163a741bb2d9c1e5..d09b2c5ccffa730255a6545d0f411a11adc05fc5
@@@ -14,21 -14,25 +14,25 @@@ ENABLE_DEBUGTRACE ?= 
  BUILD_MOD ?=
  
  ifndef ZIP
 -      ifneq ($(shell which zip),)
 +      ifneq ($(shell which zip 2>/dev/null),)
                ZIP := zip -9
        endif
 -      ifneq ($(shell which 7z),)
 +      ifneq ($(shell which 7z 2>/dev/null),)
                ZIP := 7z a -tzip -mx=9
        endif
 -      ifneq ($(shell which 7za),)
 +      ifneq ($(shell which 7za 2>/dev/null),)
                ZIP := 7za a -tzip -mx=9
        endif
      ifndef ZIP
 -        $(warning "No zip in ($(PATH))")
 +        $(warning "No zip / 7z / 7za in ($(PATH))")
          ZIP := : zip_not_found
      endif
  endif
  
+ # Set to empty string to temporarily enable warnings when debugging
+ QCCFLAGS_WERROR ?= \
+       -Werror
  # We eventually need to get rid of these
  QCCFLAGS_WTFS ?= \
        -Wno-field-redeclared
@@@ -48,7 -52,8 +52,8 @@@ QCCFLAGS ?= 
        -std=gmqcc \
        -Ooverlap-locals \
        -O3 \
-       -Werror -Wall \
+       $(QCCFLAGS_WERROR) \
+       -Wall \
        $(QCCFLAGS_WTFS) \
        -flno -futf8 -fno-bail-on-werror \
        -frelaxed-switch -freturn-assignments \