mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
makepanda: Enable additional warning messages
Also error on missing return statement in non-void function, since this is pretty much always an error and can be dangerous if not caught
This commit is contained in:
parent
a0be50c769
commit
f60c55f450
@ -1211,7 +1211,7 @@ def CompileCxx(obj,src,opts):
|
|||||||
cmd = "cl "
|
cmd = "cl "
|
||||||
if GetTargetArch() == 'x64':
|
if GetTargetArch() == 'x64':
|
||||||
cmd += "/favor:blend "
|
cmd += "/favor:blend "
|
||||||
cmd += "/wd4996 /wd4275 /wd4273 "
|
cmd += "/wd4996 "
|
||||||
|
|
||||||
# Set the minimum version to Windows Vista.
|
# Set the minimum version to Windows Vista.
|
||||||
cmd += "/DWINVER=0x600 "
|
cmd += "/DWINVER=0x600 "
|
||||||
@ -1261,7 +1261,7 @@ def CompileCxx(obj,src,opts):
|
|||||||
cmd = "icl "
|
cmd = "icl "
|
||||||
if GetTargetArch() == 'x64':
|
if GetTargetArch() == 'x64':
|
||||||
cmd += "/favor:blend "
|
cmd += "/favor:blend "
|
||||||
cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 "
|
cmd += "/wd4996 /wd4267 /wd4101 "
|
||||||
cmd += "/DWINVER=0x600 "
|
cmd += "/DWINVER=0x600 "
|
||||||
cmd += "/Fo" + obj + " /c"
|
cmd += "/Fo" + obj + " /c"
|
||||||
for x in ipath: cmd += " /I" + x
|
for x in ipath: cmd += " /I" + x
|
||||||
@ -1458,10 +1458,7 @@ def CompileCxx(obj,src,opts):
|
|||||||
if (optlevel==4): cmd += " -O3 -DNDEBUG"
|
if (optlevel==4): cmd += " -O3 -DNDEBUG"
|
||||||
|
|
||||||
# Enable more warnings.
|
# Enable more warnings.
|
||||||
cmd += " -Wall -Wno-unused-function"
|
cmd += " -Wall -Wno-unused-function -Werror=return-type"
|
||||||
|
|
||||||
if not src.endswith(".c"):
|
|
||||||
cmd += " -Wno-reorder"
|
|
||||||
|
|
||||||
# Ignore unused variables in NDEBUG builds, often used in asserts.
|
# Ignore unused variables in NDEBUG builds, often used in asserts.
|
||||||
if optlevel == 4:
|
if optlevel == 4:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user