0

I am trying to compile wireshark source code of version 1.9.2 I made a build folder cd build->cmake..->make install

Now I am getting errors as follows.

/home/techie/wireshark-1.9.2/epan/dissectors/packet-dcerpc-rs_pgo.c: In function ‘dissect_rs_pgo_query_t’:
/home/techie/wireshark-1.9.2/epan/dissectors/packet-dcerpc-rs_pgo.c:631:5: error: typedef ‘rs_pgo_query_t’ locally defined but not used [-Werror=unused-local-typedefs]
   } rs_pgo_query_t;
     ^
/home/techie/wireshark-1.9.2/epan/dissectors/packet-dcerpc-rs_pgo.c: In function ‘dissect_rs_pgo_query_key_t’:
/home/techie/wireshark-1.9.2/epan/dissectors/packet-dcerpc-rs_pgo.c:846:5: error: typedef ‘rs_pgo_query_t’ locally defined but not used [-Werror=unused-local-typedefs]
   } rs_pgo_query_t;
     ^
cc1: all warnings being treated as errors
make[2]: *** [epan/CMakeFiles/epan.dir/dissectors/packet-dcerpc-rs_pgo.c.o] Error 1
make[1]: *** [epan/CMakeFiles/epan.dir/all] Error 2
make: *** [all] Error 2
[root@localhost build]# 

If i comment out the part it is calling declared but not used it is throwing new errors. What should I do?

1 Answers1

0

In your build directory there will be a folder epan (considering the current error is coming from epan part) in there goto

./CMakeFiles/epan.dir/flags.make

For error from other modules you can goto there folders.

there you'll find a C_Flags variable like

C_FLAGS =  -O2 -g -Wno-error -W -Wextra -Wendif-labels -Wpointer-arith -Warray-bounds -Wcast-align -Wformat -Wformat-security -fexcess-precision=fast -Wdeclaration-after-statement -Wno-pointer-sign -Wold-style-definition -fvisibility=hidden -fPIC -I/home/techie/wireshark-1.9.2/build -I/home/techie/wireshark-1.9.2 -I/home/techie/wireshark-1.9.2/epan -I/home/techie/wireshark-1.9.2/tools/lemon -I/home/techie/wireshark-1.9.2/wiretap -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/home/techie/wireshark-1.9.2/build/epan -I/home/techie/wireshark-1.9.2/epan/dfilter -I/home/techie/wireshark-1.9.2/epan/dissectors -I/home/techie/wireshark-1.9.2/epan/ftypes -I/home/techie/wireshark-1.9.2/epan/wslua -I/home/techie/wireshark-1.9.2/epan/wspython

The value of the C_Flags variable may vary but you should look for tags like -Wall in it and remove them You will also want to add -Wno-error to it. This might lead to some errors like -Wformat-security ignored as -Wformat not present in such cases you can add -Wformat to it or remove -Wformat-security according to your need.

It should then be able to ignore the errors.

If you have any questions feel free to comment and ask:)