0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-03-23 10:50:58 +00:00

Add a new gcc warning option and fix the two bugs it found.

This commit is contained in:
Bill Currie 2011-03-17 19:58:56 +09:00
parent 7b9d70167f
commit 01144d23cf
3 changed files with 3 additions and 2 deletions
config.d
qw/source
tools/qfcc/source

View file

@ -177,6 +177,7 @@ if test "x$check_pipe" = xyes; then
QF_CC_OPTION(-pipe)
fi
QF_CC_OPTION(-Wsign-compare)
QF_CC_OPTION(-Wlogical-op)
QF_CC_OPTION_TEST([-fvisibility=hidden], [VISIBILITY=-fvisibility=hidden])
dnl QuakeForge uses lots of BCPL-style (//) comments, which can cause problems

View file

@ -737,7 +737,7 @@ CL_ParseServerData (void)
// allow 2.2 and 2.29 demos to play
protover = MSG_ReadLong (net_message);
if (protover != PROTOCOL_VERSION
&& !(cls.demoplayback && (protover <= 26 && protover >= 28)))
&& !(cls.demoplayback && (protover <= 26 || protover >= 28)))
Host_Error ("Server returned version %i, not %i\nYou probably "
"need to upgrade.\nCheck http://www.quakeworld.net/",
protover, PROTOCOL_VERSION);

View file

@ -494,7 +494,7 @@ do_op_quaternion (int op, expr_t *e, expr_t *e1, expr_t *e2)
if (get_type (e1) != &type_quaternion) {
if (op != '*' || op != '/')
if (op != '*' && op != '/')
return error (e1, "invalid operand for quaternion");
if (op == '*') {