summaryrefslogtreecommitdiff
path: root/main/ast_expr2.fl
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2010-01-13 20:38:42 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2010-01-13 20:38:42 +0000
commit919437428ea4856e5305e2a8f987e8290b38d20a (patch)
treebdbc9cd721f0c249f9f982485d034d35a2c3c239 /main/ast_expr2.fl
parent495b701a8591ac022e45191a9a24fad91d941169 (diff)
Flex uses fwrite incorrectly, which breaks the build. Providing a workaround.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@239920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/ast_expr2.fl')
-rw-r--r--main/ast_expr2.fl5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/ast_expr2.fl b/main/ast_expr2.fl
index ab3ae8dd5..e20f194bf 100644
--- a/main/ast_expr2.fl
+++ b/main/ast_expr2.fl
@@ -65,6 +65,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#endif
+/*!\note The latest Flex uses fwrite without checking its return value, which
+ * is a warning on some compilers. Therefore, we use this workaround, to trick
+ * the compiler into suppressing this warning. */
+#define fwrite(a,b,c,d) do { int __res = fwrite(a,b,c,d); (__res); } while (0)
+
enum valtype {
AST_EXPR_number, AST_EXPR_numeric_string, AST_EXPR_string
} ;