]> sigrok.org Git - sigrok-cli.git/commit
Fix a bunch of compiler warnings.
authorUwe Hermann <redacted>
Tue, 19 Nov 2013 10:48:06 +0000 (11:48 +0100)
committerUwe Hermann <redacted>
Tue, 19 Nov 2013 10:51:11 +0000 (11:51 +0100)
commit20fb52e08416238c60392b410f69856cc7d98650
treec2212a38d435c6a7c3fe309a7b0f557a4187e3b2
parent30364883abef6a52180fc6244d79788298729137
Fix a bunch of compiler warnings.

We need to ensure that libsigrokdecode.h is always the first #include,
otherwise some versions of Python will cause all kinds of compiler
warnings like these:

  CC       device.o
In file included from /usr/include/python3.2mu/Python.h:8:0,
                 from [...]/include/libsigrokdecode/libsigrokdecode.h:25,
                 from sigrok-cli.h:26,
                 from device.c:23:
/usr/include/python3.2mu/pyconfig.h:1182:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
 #define _POSIX_C_SOURCE 200112L
 ^
In file included from /usr/include/limits.h:26:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:168,
                 from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:34,
                 from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:11,
                 from /usr/include/glib-2.0/glib/gtypes.h:34,
                 from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from device.c:21:
/usr/include/features.h:231:0: note: this is the location of the previous definition
 #  define _POSIX_C_SOURCE 200809L
 ^

Since sigrok-cli.h already #includes libsigrok.h and libsigrokdecode.h,
just ensure that the latter is always the first #include by _only_
including it in sigrok-cli.h and nowhere else.
anykey.c
decode.c
device.c
input.c
main.c
parsers.c
session.c
show.c
sigrok-cli.h