I have been working on this patch on my desktop, with Fedora 20 installed. After patching the source, I could not build it without getting this error:
Code:
$ make
cc -Wall -Werror -c ch7036_monitor.c -o ch7036_monitor.o
ch7036_monitor.c: In function ‘main’:
ch7036_monitor.c:1017:20: error: ‘width_fix’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
init_lcd_timing(&lcd_timing, width_fix, xmode);
^
cc1: all warnings being treated as errors
make: *** [ch7036_monitor.o] Error 1
It was previously reported in this Google Group post:
http://code.google.com/p/chromium/is...tail?id=215604
And fixed with these two patches:
Code:
--- ch7036_monitor.c
+++ ch7036_monitor.c
@@ -737,7 +737,7 @@
return 0;
}
-int init_lcd_timing(struct timing_ch7036 *lcd_timing, int *width_fix,
+void init_lcd_timing(struct timing_ch7036 *lcd_timing, int *width_fix,
XRRModeInfo *xmode)
{
if ((xmode->width == 1366) && (xmode->height == 768)) {
@@ -785,7 +785,7 @@
int probe_only = 0;
int dummy_i2c = 0;
int verbose = 0;
- int *width_fix;
+ int *width_fix = NULL;
unsigned char edid[256];
unsigned char newedid[256];
int use_new_edid = 0;
Code:
--- Makefile
+++ Makefile
@@ -20,11 +20,11 @@
$(CC) $(CCFLAGS) $(INCLUDE_DIRS) -c $< -o $@
$(MON): $(OBJECTS) $(MON).o
- $(CC) $(CCFLAGS) $(INCLUDE_DIRS) $(LIB_DIRS) $^ $(LIBS) $(LDFLAGS) \
+ $(CC) $(CCFLAGS) $(INCLUDE_DIRS) $^ $(LDFLAGS) $(LIB_DIRS) $(LIBS) \
-o $@
$(BUG): $(OBJECTS) $(BUG).o
- $(CC) $(CCFLAGS) $(INCLUDE_DIRS) $(LIB_DIRS) $^ $(LIBS) $(LDFLAGS) \
+ $(CC) $(CCFLAGS) $(INCLUDE_DIRS) $^ $(LDFLAGS) $(LIB_DIRS) $(LIBS) \
-o $@
clean:
I had to apply these two patches (I manually edited the files), and then I was able to compile it on Fedora 20 too. I am posting it here in case others also run into this problem.
Bookmarks