From: Uwe Hermann Date: Wed, 3 Oct 2018 15:03:58 +0000 (+0200) Subject: sigrok-cross-mingw: Patch MXE's glib to fix compiler warnings. X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-util.git;a=commitdiff_plain;h=ef311ddb9282ea0cb1ff1a0365f8368c270f742c;hp=ef311ddb9282ea0cb1ff1a0365f8368c270f742c sigrok-cross-mingw: Patch MXE's glib to fix compiler warnings. This fixes parts of bug #986. This seems to have been fixed upstream recently: https://gitlab.gnome.org/GNOME/glib/commit/3d7cde654c4c6f3bdad32f5521f28f5802a7c377 Until MXE uses a recent enough glib, we're applying a similar (ported) patch. This fixes the following compiler warnings: src/usb.c: In function 'usb_pollfd_removed': src/usb.c:34:20: warning: format '%i' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=] #define LOG_PREFIX "usb" ^ src/libsigrok-internal.h:764:41: note: in expansion of macro 'LOG_PREFIX' #define sr_err(...) sr_log(SR_LOG_ERR, LOG_PREFIX ": " __VA_ARGS__) ^ src/usb.c:222:2: note: in expansion of macro 'sr_err' sr_err("FD to be removed (%" G_GINTPTR_FORMAT ^ src/input/input.c: In function 'sr_input_free': src/input/input.c:29:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'gsize {aka long long unsigned int}' [-Wformat=] #define LOG_PREFIX "input" ^ ./src/libsigrok-internal.h:763:42: note: in expansion of macro 'LOG_PREFIX' #define sr_warn(...) sr_log(SR_LOG_WARN, LOG_PREFIX ": " __VA_ARGS__) ^ src/input/input.c:686:3: note: in expansion of macro 'sr_warn' sr_warn("Found %" G_GSIZE_FORMAT ^ src/output/analog.c: In function 'receive': src/output/analog.c:118:34: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'guint64 {aka long long unsigned int}' [-Wformat=] g_string_append_printf(*out, "%" ^ src/scpi/scpi.c: In function 'sr_scpi_get_string': src/scpi/scpi.c:28:20: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'gsize {aka long long unsigned int}' [-Wformat=] #define LOG_PREFIX "scpi" ^ ./src/libsigrok-internal.h:760:42: note: in expansion of macro 'LOG_PREFIX' #define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__) ^ src/scpi/scpi.c:623:2: note: in expansion of macro 'sr_spew' sr_spew("Got response: '%.70s', length %" G_GSIZE_FORMAT ".", ^ In file included from session.c:22:0: session.c: In function 'srd_session_metadata_set': session.c:190:10: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'guint64 {aka long long unsigned int}' [-Wformat=] srd_dbg("Setting session %d samplerate to %"G_GUINT64_FORMAT".", ^ libsigrokdecode-internal.h:101:44: note: in definition of macro 'srd_dbg' #define srd_dbg(...) srd_log(SRD_LOG_DBG, __VA_ARGS__) ^ ---