On Thu, Apr 4, 2013 at 4:27 PM, nico <sl1200...@gmail.com> wrote: > Hi, > my compiler is Clang on MacOS 10.7.5. > I run > ./configure --disable-log --prefix=/opt/local > make CFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.6" > and here's the output: > > Making all in libusb > CC libusb_1_0_la-core.lo > core.c:1755:30: warning: use of logical '&&' with constant operand > [-Wconstant-logical-operand] > return (usbi_backend->caps && USBI_CAP_HAS_HID_ACCESS); > ^ ~~~~~~~~~~~~~~~~~~~~~~~ > core.c:1755:30: note: use '&' for a bitwise operation > return (usbi_backend->caps && USBI_CAP_HAS_HID_ACCESS); > ^~ > & > core.c:1755:30: note: remove constant to silence this warning > return (usbi_backend->caps && USBI_CAP_HAS_HID_ACCESS); > ~^~~~~~~~~~~~~~~~~~~~~~~~~~ > core.c:1757:30: warning: use of logical '&&' with constant operand > [-Wconstant-logical-operand] > return (usbi_backend->caps && > USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER); > ^ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > core.c:1757:30: note: use '&' for a bitwise operation > return (usbi_backend->caps && > USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER); > ^~ > & > core.c:1757:30: note: remove constant to silence this warning > return (usbi_backend->caps && > USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER); > ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2 warnings generated. > core.c:1755:30: warning: use of logical '&&' with constant operand > [-Wconstant-logical-operand] > return (usbi_backend->caps && USBI_CAP_HAS_HID_ACCESS); > ^ ~~~~~~~~~~~~~~~~~~~~~~~ > core.c:1755:30: note: use '&' for a bitwise operation > return (usbi_backend->caps && USBI_CAP_HAS_HID_ACCESS); > ^~ > & > core.c:1755:30: note: remove constant to silence this warning > return (usbi_backend->caps && USBI_CAP_HAS_HID_ACCESS); > ~^~~~~~~~~~~~~~~~~~~~~~~~~~ > core.c:1757:30: warning: use of logical '&&' with constant operand > [-Wconstant-logical-operand] > return (usbi_backend->caps && > USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER); > ^ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > core.c:1757:30: note: use '&' for a bitwise operation > return (usbi_backend->caps && > USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER); > ^~ > & > core.c:1757:30: note: remove constant to silence this warning > return (usbi_backend->caps && > USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER); > ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2 warnings generated.
Yes you are right. If using Apple gcc, then there are no warnings. If using clang, then yes two warnings are generated. Tested under Mac OS X 10.7.5. -- Xiaofan ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel