From: Ben Pfaff Date: Wed, 26 Sep 2012 00:09:47 +0000 (-0700) Subject: gnumeric-reader: Add cast to suppress warning. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f93823750113914727d641dd7e526349fe98cba0;p=pspp gnumeric-reader: Add cast to suppress warning. This suppresses a GCC warning for a mismatch between xmlInputCloseCallback, which takes a "void *" parameter, and gzclose(), which takes a "gzFile" (which is "struct gzFile_s *"). This came up with an upgrade from "squeeze" to "wheezy". I assume that a gzclose prototype became visible or that gzFile changed away from "void *". An alternative would be to write a trampoline to just transform one pointer type to the other, but the xmlReaderForIO() invocation already has one function cast so a second cast doesn't make it much worse. --- diff --git a/src/data/gnumeric-reader.c b/src/data/gnumeric-reader.c index 56ebc3062a..b9def31cb6 100644 --- a/src/data/gnumeric-reader.c +++ b/src/data/gnumeric-reader.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -294,7 +294,8 @@ gnumeric_open_reader (struct spreadsheet_read_info *gri, struct dictionary **dic r = xzalloc (sizeof *r); - r->xtr = xmlReaderForIO ((xmlInputReadCallback) gzread, gzclose, gz, + r->xtr = xmlReaderForIO ((xmlInputReadCallback) gzread, + (xmlInputCloseCallback) gzclose, gz, NULL, NULL, 0); if ( r->xtr == NULL)