From 220772dc19ef8b9c20a919375b47390a794c4e42 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 27 Feb 2017 10:52:08 +0100 Subject: text2pcap: fix -Wmacro-redefined warning With flex 2.6.3, this warning is observed (which causes a build failure when -Werror is not disabled: text2pcap-scanner.c:398:9: warning: 'yywrap' macro redefined [-Wmacro-redefined] #define yywrap() (/*CONSTCOND*/1) ^ text2pcap-scanner.c:76:13: note: previous definition is here #define yywrap yywrap Issue is specific to flex 2.6.3 and resolved upstream at https://github.com/westes/flex/issues/162 Change-Id: I861565f5080f87a9457427e7a63b5d9256c49e85 Reviewed-on: https://code.wireshark.org/review/20294 Petri-Dish: Peter Wu Reviewed-by: Michael Mann --- text2pcap-scanner.l | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'text2pcap-scanner.l') diff --git a/text2pcap-scanner.l b/text2pcap-scanner.l index 1f45f8efda..f422bca69a 100644 --- a/text2pcap-scanner.l +++ b/text2pcap-scanner.l @@ -25,6 +25,12 @@ */ %option noyywrap +/* + * Prefix scanner routines with "text2pcap_" rather than "yy" to avoid a + * "redefined macro" warning with flex 2.6.3. + */ +%option prefix="text2pcap_" + %{ /******************************************************************************** -- cgit v1.2.1