X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgis%2Fwms.c;h=51f69bc8ca8379189d134027cdf493b1f1bfab88;hb=128608a085fd2a66e8145868c30b05c5c6e1cc3b;hp=aa54444593b1d264b41597c41a6d0565114e72e7;hpb=d01fb11de5bcf91224348bf41abb6788d0af2545;p=grits diff --git a/src/gis/wms.c b/src/gis/wms.c index aa54444..51f69bc 100644 --- a/src/gis/wms.c +++ b/src/gis/wms.c @@ -457,7 +457,8 @@ WmsInfo *wms_info_new_for_bmng(WmsLoader loader, WmsFreeer freeer) void srtm_bil_loader(WmsCacheNode *node, const gchar *path, gint width, gint height) { WmsBil *bil = g_new0(WmsBil, 1); - g_file_get_contents(path, (gchar**)&bil->data, NULL, NULL); + gchar **char_data = (gchar**)&bil->data; + g_file_get_contents(path, char_data, NULL, NULL); bil->width = width; bil->height = height; node->data = bil; @@ -476,8 +477,9 @@ void srtm_pixbuf_loader(WmsCacheNode *node, const gchar *path, gint width, gint guchar *pixels = gdk_pixbuf_get_pixels(pixbuf); gint stride = gdk_pixbuf_get_rowstride(pixbuf); - gint16 *data; - g_file_get_contents(path, (gchar**)&data, NULL, NULL); + gint16 *data; + gchar **char_data = (gchar**)&data; + g_file_get_contents(path, char_data, NULL, NULL); for (int r = 0; r < height; r++) { for (int c = 0; c < width; c++) { gint16 value = data[r*width + c];