Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#50 code relying on char being unsigned

closed-fixed
Olaf Barthel
None
5
2010-08-22
2009-02-13
Georg Steger
No

The return value of functions like strcmp, memcmp relies on char being unsigned. If char is signed (like with gcc on 68k or x86) return value can be wrong.

(Someone noticed similiar bug in AROS clib and I looked around to see how these functions are done elsewhere)

Discussion

  • Olaf Barthel
    Olaf Barthel
    2010-08-20

    • assigned_to: nobody --> obarthel
     
  • Olaf Barthel
    Olaf Barthel
    2010-08-20

    I checked and found that this requirement exists for memcmp(), strcmp() *and* strncmp(), too.

     
  • Olaf Barthel
    Olaf Barthel
    2010-08-22

    • status: open --> closed
     
  • Olaf Barthel
    Olaf Barthel
    2010-08-22

    Fixed in clib2 1.205

     
  • Olaf Barthel
    Olaf Barthel
    2010-08-22

    • status: closed --> closed-fixed