Wireshark-bugs: [Wireshark-bugs] [Bug 7778] New: Unable to compile stock lemon.c due to errors.
Date: Mon, 1 Oct 2012 09:35:53 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7778

           Summary: Unable to compile stock lemon.c due to errors.
           Product: Wireshark
           Version: 1.8.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Low
         Component: Extras
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: wp02855@xxxxxxxxx


Build Information:
N/A
--
Wireshark-1.8.2 issue (minor/normal).

In wireshark-1.8.2/tools/lemon/ file lemon.c gives 
compile errors when compiled with:

gcc -O2 -Wall -o lemon lemon.c

Errors listed below:

odie:/usr/local/src/wireshark-1.8.2/tools/lemon # gcc -Wall -O2 lemon.c
lemon.c:1033:27: error: expected ';', ',' or ')' before '_U_'
lemon.c:1451:19: error: expected ';', ',' or ')' before '_U_'
lemon.c:944:12: warning: 'resolve_conflict' used but never defined
lemon.c:1387:1: warning: 'make_basename' defined but not used
lemon.c:1430:13: warning: 'handle_D_option' defined but not used

The problem is with the _U_ parameter, which doesn't exist anywhere
else in lemon.c, so what I did to resolve the errors during compile
is as follows:

int main should be:

 /* The main program.  Parse the command line and do it... */
-int main(int argc _U_, char **argv)
+int main(int argc, char **argv)

in function resolve_conflict:

@@ -1030,7 +1030,7 @@
 static int resolve_conflict(
     struct action *apx,
     struct action *apy,
-    struct symbol *errsym _U_)
+    struct symbol *errsym)

the prototype for resolve_conflict in lemon.c is:

static int resolve_conflict(struct action *, struct action *,struct symbol
*errsym);

Also, function prototyping should be added to all functions listed in
'lemon.c'.

Bill Parker

p.s. - The _U_ is not in the original lemon.c program located at
http://www.hwaci.com/drh/

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.