[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#219940: Also seeing this bug



I'm also suffering from this bug, with the headers from
libbluetooth1-dev (which I maintain.)

/usr/include/bluetooth/rfcomm.h:#define RFCOMMGETDEVLIST       
_IOR('R', 210, int)

means this doesn't compile:

if (ioctl(ctl, RFCOMMGETDEVLIST, (void *) dl) < 0) {

with an error "warning: signed and unsigned type in conditional
expression".

this expression, when fully pre-processed (and indented by me for some
sort of readability), reads:

 if (ioctl(ctl,
              (((2U) << (((0 +8)+8)+14)) | ((('R')) << (0 +8)) |
(((210)) << 0)
| (
                (((
                    (sizeof(int) == sizeof(int[1])
                    && sizeof(int) < (16384))
                    ? sizeof(int) :
                    __invalid_size_argument_for_IOC)))
                << ((0 +8)+8))),
              (void *) dl)
          < 0) {

the problem is that sizeof(int) is unsigned,
__invalid_size_argument_for_IOC is signed.


making __invalid_size_argument_for_IOC to be unsigned int makes it
compile OK.

-- Edd


Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: