From: John Darrington Date: Wed, 21 Feb 2007 08:27:16 +0000 (+0000) Subject: Fix warnings when compiling with mingw32 X-Git-Tag: v0.6.0~537 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bea461dcf5d18e97e76facc5b1faf9ca86be7646;p=pspp-builds.git Fix warnings when compiling with mingw32 --- diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c index ffaa4048..a2c0af0f 100644 --- a/src/libpspp/i18n.c +++ b/src/libpspp/i18n.c @@ -67,7 +67,6 @@ recode_string(enum conv_id how, const char *text, int length) char *outbuf = 0; size_t outbufferlength; size_t result; - char *ip ; char *op ; size_t inbytes = 0; size_t outbytes ; @@ -92,13 +91,12 @@ recode_string(enum conv_id how, const char *text, int length) outbuf = xmalloc(outbufferlength); op = outbuf; - ip = (char *) text; outbytes = outbufferlength; inbytes = length; do { - result = iconv(convertor[how], &ip, &inbytes, + result = iconv(convertor[how], &text, &inbytes, &op, &outbytes); if ( -1 == result ) @@ -113,7 +111,7 @@ recode_string(enum conv_id how, const char *text, int length) { *op++ = fallbackchar; outbytes--; - ip++; + text++; inbytes--; break; } @@ -123,7 +121,6 @@ recode_string(enum conv_id how, const char *text, int length) outbufferlength <<= 1; outbuf = xmalloc(outbufferlength); op = outbuf; - ip = (char *) text; outbytes = outbufferlength; inbytes = length; break; diff --git a/src/output/dummy-chart.c b/src/output/dummy-chart.c index 8c4c55e4..dc20162c 100644 --- a/src/output/dummy-chart.c +++ b/src/output/dummy-chart.c @@ -17,8 +17,9 @@ 02110-1301, USA. */ #include - #include +#include +#include "chart.h" struct chart * @@ -28,7 +29,7 @@ chart_create(void) } void -chart_submit(struct chart *chart) +chart_submit(struct chart *chart UNUSED) { } diff --git a/src/ui/gui/var-sheet.c b/src/ui/gui/var-sheet.c index 3c26fcd1..d8e6f6f7 100644 --- a/src/ui/gui/var-sheet.c +++ b/src/ui/gui/var-sheet.c @@ -33,7 +33,9 @@ #include #include +#if HAVE_LANGINFO_H #include +#endif #include @@ -444,10 +446,12 @@ psppire_variable_sheet_create (gchar *widget_name, gtk_sheet_set_model (GTK_SHEET (sheet), G_SHEET_MODEL (the_var_store)); +#if HAVE_LANGINFO_H /* Since this happens inside glade_xml_new, we must prevent strings from * being re-encoded twice */ codeset = bind_textdomain_codeset (PACKAGE, 0); bind_textdomain_codeset (PACKAGE, nl_langinfo (CODESET)); +#endif for (i = 0 ; i < n_COLS ; ++i ) { g_sheet_hetero_column_set_button_label (G_SHEET_HETERO_COLUMN (geo), i, @@ -456,7 +460,9 @@ psppire_variable_sheet_create (gchar *widget_name, g_sheet_hetero_column_set_width (G_SHEET_HETERO_COLUMN (geo), i, column_def[i].width); } +#if HAVE_LANGINFO_H bind_textdomain_codeset (PACKAGE, codeset); +#endif gtk_widget_show (sheet);