Marcus Meissner
8447d88e65
OBS-URL: https://build.opensuse.org/request/show/174006 OBS-URL: https://build.opensuse.org/package/show/graphics/libXbgi?expand=0&rev=1
31 lines
846 B
Diff
31 lines
846 B
Diff
From: Jan Engelhardt <jengelh@inai.de>
|
|
Date: 2013-04-30 16:29:33.540380817 +0200
|
|
|
|
gcc:
|
|
getpixel.c: In function 'getpixel':
|
|
getpixel.c:29:1: warning: control reaches end of non-void function [-Wreturn-type]
|
|
|
|
rpmlint:
|
|
I: Program returns random data in a function
|
|
E: libXbgi no-return-in-nonvoid-function getpixel.c:29
|
|
|
|
If the color is not in the palette, the function will return trash.
|
|
Any value would be ok, but consistently give 0 to quiesce gcc.
|
|
|
|
---
|
|
src/getpixel.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
Index: xbgi/src/getpixel.c
|
|
===================================================================
|
|
--- xbgi.orig/src/getpixel.c
|
|
+++ xbgi/src/getpixel.c
|
|
@@ -26,6 +26,7 @@ unsigned int getpixel(int x, int y)
|
|
for (col = 0; col < MAXCOLORS + 1; col++)
|
|
if (vga_palette[col].pixel_value == pixel)
|
|
return (col);
|
|
+ return 0;
|
|
}
|
|
|
|
|