Alan Stern <stern@...> writes: > > Given that hid_mouse_ignore_list[] actually contains the proper > > (USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) pair > > as far as I can make out and assuming a properly working compiler, > > hid_match_one_id() returns FALSE only if the hdev's members in question > > are not properly set up. And I wouldn't know where to look for /that/. > > You ought to be able to figure out what's going on by adding a few > debugging statements in suitable places. ^^^^^^^^^^^^^^^ What are those ominous places? > > On a side note, I'm a little surprised that the arguments to … > > are not const-qualified, although none of their members are actually > > mutated there … > > That sort of thing happens all the time. People don't remember to add > const qualifications because it's not obvious when they _could_ be > added, How can it not be obvious to the author(s) of their own code? Does the semantics of the language randomly change when nobody's watching? > the compiler doesn't complain about it, $ gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-51) $ gcc -Wall member.c -o member member.c: In function ‘g’: member.c:12: error: assignment of read-only location $ cat member.c struct A { int x, y; }; void f( struct A * a ) { a->x = 1; } void g( const struct A * a ) { a->y = 2; } int main( int argc, char * argv[] ) { struct A a; f(&a); g(&a); return 0; } This one does. And I'm positive all newer versions do, too. > and it doesn't make much > difference anyway. I disagree. It's precisely what aids in avoiding situations like the current one where nobody seems to know what's going on anymore. That's what const-qualifications where invented for (if there is such a thing). Somewhere a member's value is changed where it shouldn't. How can that not make a difference? Cheers, Christian ��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥