Description of problem: Stratus wrote a disk test utility in C++ that includes /usr/include/ext2fs/bitops.h. That file has a function called ext2fs_find_first_bit_set (line 438) with a bad typecast. The utility fails to compile with the following error: g++ src/disk_test.cc -o progs/disk_test_64 -lext2fs In file included from /usr/include/ext2fs/ext2fs.h:250, from src/disk_test.h:15, from src/disk_test.cc:40: /usr/include/ext2fs/bitops.h: In function `int ext2fs_find_first_bit_set(void*, unsigned int)': /usr/include/ext2fs/bitops.h:440: error: invalid conversion from `unsigned char*' to `char*' make: *** [test1] Error 1 The offending code looks like this (from bitops.h) _INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size) { char *cp = (unsigned char *) addr; Stratus has verified that cp can be declared as an unsigned char and it all just works fine after that. Version-Release number of selected component (if applicable): e2fsprogs-devel-1.35-12.2.EL4 How reproducible: 100% Steps to Reproduce: 1. compile disk utility that includes bitops.h 2. 3. Actual results: compile error. Expected results: compile success. Additional info:
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Can it be that this utility is using the ext2fs_find_first_bit_set without setting the type to (void *) for the first argument?
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2007-0255.html