From: Uwe Hermann Date: Sun, 18 Feb 2018 20:13:56 +0000 (+0100) Subject: Fix two compiler warnings on MinGW/MSYS2. X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=65788048f0e74461b63ad623a821377857ed4aaa Fix two compiler warnings on MinGW/MSYS2. The config.h file must always be included as first file. src/output/csv.c: In function 'gen_header': src/output/csv.c:64:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] #define LOG_PREFIX "output/csv" ^ ./src/libsigrok-internal.h:753:42: note: in expansion of macro 'LOG_PREFIX' #define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__) ^ src/output/csv.c:244:3: note: in expansion of macro 'sr_info' sr_info("Set sample period to %" PRIu64 " %s", ^ src/output/csv.c: In function 'dump_saved_values': src/output/csv.c:462:34: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] g_string_append_printf(*out, "%" PRIu64 "%s", ^ In file included from src/hardware/ftdi-la/protocol.c:21:0: src/hardware/ftdi-la/protocol.c: In function 'send_samples': src/hardware/ftdi-la/protocol.h:28:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=] #define LOG_PREFIX "ftdi-la" ^ ./src/libsigrok-internal.h:751:42: note: in expansion of macro 'LOG_PREFIX' #define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__) ^ src/hardware/ftdi-la/protocol.c:29:2: note: in expansion of macro 'sr_spew' sr_spew("Sending %" PRIu64 " samples.", samples_to_send); ^ --- diff --git a/src/hardware/ftdi-la/protocol.c b/src/hardware/ftdi-la/protocol.c index 264b4f22..2f7a824a 100644 --- a/src/hardware/ftdi-la/protocol.c +++ b/src/hardware/ftdi-la/protocol.c @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +#include #include #include "protocol.h" diff --git a/src/output/csv.c b/src/output/csv.c index 426cb6ed..a5770c65 100644 --- a/src/output/csv.c +++ b/src/output/csv.c @@ -53,8 +53,8 @@ * this is forced to be off. */ -#include #include +#include #include #include #include