1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-23 22:52:34 +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) { if (!color_table[0] || !color_table[1] || !color_table[2] || !color_table[3] || !symbol_table || !bsize) {
RErrorCode = RERR_NOMEMORY; RErrorCode = RERR_NOMEMORY;
free_color_symbol_table(color_table[], symbol_table); free_color_symbol_table(color_table, symbol_table);
return NULL; return NULL;
} }
@@ -145,7 +145,7 @@ RImage *RGetImageFromXPMData(RContext * context, char **data)
image = RCreateImage(w, h, transp); image = RCreateImage(w, h, transp);
if (!image) { if (!image) {
free_color_symbol_table(color_table[], symbol_table); free_color_symbol_table(color_table, symbol_table);
return NULL; return NULL;
} }
@@ -215,12 +215,12 @@ RImage *RGetImageFromXPMData(RContext * context, char **data)
line++; line++;
} }
free_color_symbol_table(color_table[], symbol_table); free_color_symbol_table(color_table, symbol_table);
return image; return image;
bad_format: bad_format:
RErrorCode = RERR_BADIMAGEFILE; RErrorCode = RERR_BADIMAGEFILE;
free_color_symbol_table(color_table[], symbol_table); free_color_symbol_table(color_table, symbol_table);
if (image) if (image)
RReleaseImage(image); RReleaseImage(image);
return NULL; return NULL;
@@ -281,7 +281,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
!color_table[3] || !symbol_table || !bsize || !buffer) { !color_table[3] || !symbol_table || !bsize || !buffer) {
RErrorCode = RERR_NOMEMORY; RErrorCode = RERR_NOMEMORY;
fclose(f); fclose(f);
free_color_symbol_table(color_table[], symbol_table); free_color_symbol_table(color_table, symbol_table);
if (buffer) if (buffer)
free(buffer); free(buffer);
return NULL; return NULL;
@@ -338,7 +338,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
image = RCreateImage(w, h, transp); image = RCreateImage(w, h, transp);
if (!image) { if (!image) {
fclose(f); fclose(f);
free_color_symbol_table(color_table[], symbol_table); free_color_symbol_table(color_table, symbol_table);
if (buffer) if (buffer)
free(buffer); free(buffer);
return NULL; return NULL;
@@ -417,7 +417,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
} }
fclose(f); fclose(f);
free_color_symbol_table(color_table[], symbol_table); free_color_symbol_table(color_table, symbol_table);
if (buffer) if (buffer)
free(buffer); free(buffer);
return image; return image;
@@ -425,7 +425,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
bad_format: bad_format:
RErrorCode = RERR_BADIMAGEFILE; RErrorCode = RERR_BADIMAGEFILE;
fclose(f); fclose(f);
free_color_symbol_table(color_table[], symbol_table); free_color_symbol_table(color_table, symbol_table);
if (buffer) if (buffer)
free(buffer); free(buffer);
if (image) if (image)
@@ -435,7 +435,7 @@ RImage *RLoadXPM(RContext * context, char *file, int index)
bad_file: bad_file:
RErrorCode = RERR_BADIMAGEFILE; RErrorCode = RERR_BADIMAGEFILE;
fclose(f); fclose(f);
free_color_symbol_table(color_table[], symbol_table); free_color_symbol_table(color_table, symbol_table);
if (buffer) if (buffer)
free(buffer); free(buffer);
if (image) if (image)