Author: pepeto
Date: Tue Jan 13 16:37:58 2015
New Revision: 27661

URL: http://svn.gna.org/viewcvs/freeciv?rev=27661&view=rev
Log:
Force usage of semicolon after fc_assert_XXX().

See gna patch #5697

Modified:
    trunk/utility/log.h

Modified: trunk/utility/log.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/utility/log.h?rev=27661&r1=27660&r2=27661&view=diff
==============================================================================
--- trunk/utility/log.h (original)
+++ trunk/utility/log.h Tue Jan 13 16:37:58 2015
@@ -132,7 +132,8 @@
     fc_assert_fail(file, function, line, #condition,                        \
                    message, ## __VA_ARGS__);                                \
     action;                                                                 \
-  }
+  }                                                                         \
+  (void) 0 /* Force the usage of ';' at the end of the call. */
 
 #ifdef NDEBUG
 /* Disabled. */
@@ -178,7 +179,7 @@
 /* Exit on failure with extra message. */
 #define fc_assert_exit_msg(condition, message, ...)                         \
   fc_assert_action(condition,                                               \
-                   log_fatal(message, ## __VA_ARGS__); exit(EXIT_FAILURE));
+                   log_fatal(message, ## __VA_ARGS__); exit(EXIT_FAILURE))
 
 #ifdef __cplusplus
 #ifdef CXX11_STATIC_ASSERT


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to