1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-23 14:42:29 +01:00

Fix compilation failure

This fixes a compilation failure with gcc-4.3.4, where it complains

nxpm.c: In function RGetImageFromXPMData:
nxpm.c:99: error: expected expression before ] token
...
This commit is contained in:
Andreas Tscharner
2009-09-08 23:05:35 +02:00
committed by Carlos R. Mafra
parent 62bf6d17b5
commit 5b93254d0f

View File

@@ -96,7 +96,7 @@ RImage *RGetImageFromXPMData(RContext * context, char **data)
if (!color_table[0] || !color_table[1] || !color_table[2] || !color_table[3] || !symbol_table || !bsize) {
RErrorCode = RERR_NOMEMORY;
free_color_symbol_table(color_table[], symbol_table);
free_color_symbol_table(color_table, symbol_table);
return NULL;
}
@@ -145,7 +145,7 @@ RImage *RGetImageFromXPMData(RContext * context, char **data)
image = RCreateImage(w, h, transp);
if (!image) {
free_color_symbol_table(color_table[], symbol_table);
free_color_symbol_table(color_table, symbol_table);
return NULL;
}
@@ -215,12 +215,12 @@ RImage *RGetImageFromXPMData(RContext * context, char **data)
line++;
}
free_color_symbol_table(color_table[], symbol_table);
free_color_symbol_table(color_table, symbol_table);
return image;
bad_format:
RErrorCode = RERR_BADIMAGEFILE;
free_color_symbol_table(color_table[], symbol_table);
free_color_symbol_table(color_table, symbol_table);
if (image)
RReleaseImage(image);
return NULL;
@@ -281,7 +281,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
!color_table[3] || !symbol_table || !bsize || !buffer) {
RErrorCode = RERR_NOMEMORY;
fclose(f);
free_color_symbol_table(color_table[], symbol_table);
free_color_symbol_table(color_table, symbol_table);
if (buffer)
free(buffer);
return NULL;
@@ -338,7 +338,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
image = RCreateImage(w, h, transp);
if (!image) {
fclose(f);
free_color_symbol_table(color_table[], symbol_table);
free_color_symbol_table(color_table, symbol_table);
if (buffer)
free(buffer);
return NULL;
@@ -417,7 +417,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
}
fclose(f);
free_color_symbol_table(color_table[], symbol_table);
free_color_symbol_table(color_table, symbol_table);
if (buffer)
free(buffer);
return image;
@@ -425,7 +425,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
bad_format:
RErrorCode = RERR_BADIMAGEFILE;
fclose(f);
free_color_symbol_table(color_table[], symbol_table);
free_color_symbol_table(color_table, symbol_table);
if (buffer)
free(buffer);
if (image)
@@ -435,7 +435,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
bad_file:
RErrorCode = RERR_BADIMAGEFILE;
fclose(f);
free_color_symbol_table(color_table[], symbol_table);
free_color_symbol_table(color_table, symbol_table);
if (buffer)
free(buffer);
if (image)