$NetBSD: patch-synacore,v 1.1 2007/05/23 11:44:36 rillig Exp $ gcc4 complains about possibly undefined behavior in line 161. --- syna_core.c.orig 2001-04-26 22:46:13.000000000 +0200 +++ syna_core.c 2007-05-23 13:27:21.000000000 +0200 @@ -158,14 +158,13 @@ static void fadeFade() /* //Bytewize version was: *(ptr++) -= *ptr+(*ptr>>1)>>4;*/ if (*ptr) /* //if (*ptr & 0xf0f0f0f0ul)*/ - *(ptr++) -= + *ptr -= ((*ptr & 0xf0f0f0f0ul) >> 4) + ((*ptr & 0xe0e0e0e0ul) >> 5); /* //else { // *(ptr++) = (*ptr * 14 >> 4) & 0x0f0f0f0ful; //}*/ - else - ptr++; + ptr++; } while (--i > 0); }