From 735d0c815316dd9524fefca9a709ac395200eb95 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 21 Mar 2011 18:12:20 -0400 Subject: Banish compiler warnings in the Qt support. All regression tests pass. --- libgps_core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libgps_core.c') diff --git a/libgps_core.c b/libgps_core.c index f28e74b2..6618b519 100644 --- a/libgps_core.c +++ b/libgps_core.c @@ -55,10 +55,10 @@ struct privdata_t #define DEBUG_CALLS 1 /* shallowest debug level */ #define DEBUG_JSON 5 /* minimum level for verbose JSON debugging */ static int debuglevel = 0; +static FILE *debugfp; #ifndef USE_QT static int waitcount = 0; -#endif -static FILE *debugfp; +#endif /* USE_QT */ void gps_enable_debug(int level, FILE * fp) /* control the level and destination of debug trace messages */ @@ -718,7 +718,9 @@ extern const char /*@observer@*/ *gps_errstr(const int err) #ifndef USE_QT return netlib_errstr(err); #else - return ""; + char buf[32]; + (void)snprintf(buf, sizeof(buf), "Qt error %d", err); + return buf; #endif } -- cgit v1.2.1