File evtouch-20081023-fix-compiler_warning.diff of Package x11-input-evtouch
diff --git a/ev_calibrate.c b/ev_calibrate.c
index c027723..831b65e 100644
--- a/ev_calibrate.c
+++ b/ev_calibrate.c
@@ -354,8 +354,9 @@ int main (void)
/* create a new graphical context. (for the black crosses)*/
gc = XCreateGC(display, win, valuemask, &values);
- if (gc < 0) {
- fprintf(stderr, "XCreateGC: \n");
+ if (!gc) {
+ fprintf(stderr, "XCreateGC: error\n");
+ exit (1);
}
/* Assign font to GC */
@@ -372,6 +373,11 @@ int main (void)
/* define graphical context for red crosses */
red_gc = XCreateGC(display, win, valuemask, &values);
+ if (!red_gc) {
+ fprintf(stderr, "XCreateGC: error\n");
+ exit (1);
+ }
+
XSetForeground(display, red_gc, active_col.pixel);
XSetBackground(display, red_gc, active_col.pixel);
XSetLineAttributes(display, gc,