summaryrefslogtreecommitdiffstats
path: root/patches/fbv-1.0b/generic/fbv-1.0b-pointer-signedness.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/fbv-1.0b/generic/fbv-1.0b-pointer-signedness.diff')
-rw-r--r--patches/fbv-1.0b/generic/fbv-1.0b-pointer-signedness.diff93
1 files changed, 93 insertions, 0 deletions
diff --git a/patches/fbv-1.0b/generic/fbv-1.0b-pointer-signedness.diff b/patches/fbv-1.0b/generic/fbv-1.0b-pointer-signedness.diff
new file mode 100644
index 000000000..fe03b0f8e
--- /dev/null
+++ b/patches/fbv-1.0b/generic/fbv-1.0b-pointer-signedness.diff
@@ -0,0 +1,93 @@
+cc1: warnings being treated as errors
+png.c: In function 'fh_png_load':
+png.c:108: error: pointer targets in assignment differ in signedness
+png.c:111: error: comparison between signed and unsigned
+png.c:114: error: pointer targets in initialization differ in signedness
+png.c:118: error: comparison between signed and unsigned
+png.c:131: error: pointer targets in assignment differ in signedness
+png.c:132: error: comparison between signed and unsigned
+
+---
+ Makefile.am | 4 ++--
+ fb_display.c | 8 ++++----
+ png.c | 10 +++++-----
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+Index: fbv-1.0b/png.c
+===================================================================
+--- fbv-1.0b.orig/png.c
++++ fbv-1.0b/png.c
+@@ -50,12 +50,12 @@ int fh_png_load(char *name,unsigned char
+ png_structp png_ptr;
+ png_infop info_ptr;
+ png_uint_32 width, height;
+- int i;
++ unsigned int i;
+ int bit_depth, color_type, interlace_type;
+ int number_passes,pass, trans = 0;
+- char *rp;
++ unsigned char *rp;
+ png_bytep rptr[2];
+- char *fbptr;
++ unsigned char *fbptr;
+ FILE *fh;
+
+ if(!(fh=fopen(name,"rb"))) return(FH_ERROR_FILE);
+@@ -98,7 +98,7 @@ int fh_png_load(char *name,unsigned char
+ unsigned char * alpha_buffer = (unsigned char*) malloc(width * height);
+ unsigned char * aptr;
+
+- rp = (char*) malloc(width * 4);
++ rp = (unsigned char*) malloc(width * 4);
+ rptr[0] = (png_bytep) rp;
+
+ *alpha = alpha_buffer;
+@@ -110,7 +110,7 @@ int fh_png_load(char *name,unsigned char
+
+ for(i=0; i<height; i++)
+ {
+- int n;
++ unsigned int n;
+ unsigned char *trp = rp;
+
+ png_read_rows(png_ptr, rptr, NULL, 1);
+Index: fbv-1.0b/fb_display.c
+===================================================================
+--- fbv-1.0b.orig/fb_display.c
++++ fbv-1.0b/fb_display.c
+@@ -81,11 +81,11 @@ void fb_display(unsigned char *rgbbuff,
+ x_stride = (fix.line_length * 8) / var.bits_per_pixel;
+
+ /* correct panning */
+- if(x_pan > x_size - x_stride) x_pan = 0;
+- if(y_pan > y_size - var.yres) y_pan = 0;
++ if(x_pan > x_size - (int)x_stride) x_pan = 0;
++ if(y_pan > y_size - (int)var.yres) y_pan = 0;
+ /* correct offset */
+- if(x_offs + x_size > x_stride) x_offs = 0;
+- if(y_offs + y_size > var.yres) y_offs = 0;
++ if(x_offs + x_size > (int)x_stride) x_offs = 0;
++ if(y_offs + y_size > (int)var.yres) y_offs = 0;
+
+ /* blit buffer 2 fb */
+ fbbuff = convertRGB2FB(fh, rgbbuff, x_size * y_size, var.bits_per_pixel, &bp);
+Index: fbv-1.0b/Makefile.am
+===================================================================
+--- fbv-1.0b.orig/Makefile.am
++++ fbv-1.0b/Makefile.am
+@@ -2,13 +2,13 @@ bin_PROGRAMS = \
+ fbv
+
+ fbv_LDADD = \
+- $(bla_LIBS)
++ $(libpng_LIBS)
+
+ AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
+ -O2 -D_GNU_SOURCE \
+- $(bla_CFLAGS)
++ $(libpng_CFLAGS)
+
+ EXTRA_DIST = \
+ autogen.sh