Menu

#4 Problems with 1.9

closed-fixed
nobody
None
5
2010-05-15
2010-04-30
Anonymous
No

Hi,

since version 1.9 we have problems when the uthash and utlist header are included in the same file. I attached three very simple programs.

1) uthash.c compiles without problems but with a warning
2) utlist.c no problem at all
3) both examples combined in one (test.c) -> two different errors depending on the order of the include statements

This was not the case with 1.8. No special flags have been used and the gcc version is 4.4.3.

Regards,

Bastian Blywis

Discussion

  • Nobody/Anonymous

     
  • Troy Hanson

    Troy Hanson - 2010-05-15
    • status: open --> closed-fixed
     
  • Troy Hanson

    Troy Hanson - 2010-05-15

    Thanks for the bug report. (1) is a true warning because this test file passes 1 literally as the second argument to HASH_FIND_INT, but that argument is a key pointer. So this really is a case of a integer being used as a pointer without a cast. If you instead use "int a=1;" then pass &a as the second argument this warning disappears. Regarding (2) and (3), thanks, I have fixed the warning when using utlist and uthash together in uthash 1.9.1