wmcliphist: Fix unused but set variable compiler warning.

In particular,
utils.c: In function ‘from_utf8’:
utils.c:13:7: warning: variable ‘error_code’ set but not used
 [-Wunused-but-set-variable]
  gint error_code;
       ^
This commit is contained in:
Doug Torrance 2014-11-22 20:48:40 -06:00 committed by Carlos R. Mafra
parent e2ecd4b877
commit cf6aed73bc

View file

@ -10,11 +10,11 @@ from_utf8(gchar *string) {
GError *error;
gchar *converted;
/* gchar *error_msg; */
gint error_code;
/* gint error_code; */
converted = g_locale_from_utf8(string, -1, &bytes_read, &bytes_written,
&error);
error_code = (error == NULL) ? 0 : error->code;
/* error_code = (error == NULL) ? 0 : error->code; */
/*
* fprintf(stderr, "from_utf8: %d b read, %d b written, error: %d\n",
* bytes_read, bytes_written, error_code);