Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1140 closed defect (fixed)

Signed/unsigned comparison warning on FreeBSD

Reported by: historic_bruno Owned by: philip
Priority: Should Have Milestone: Alpha 9
Component: Core engine Keywords: freebsd
Cc: Patch:

Description (last modified by historic_bruno)

This warning occurs almost constantly when building on FreeBSD:

../../../source/lib/os_path.h: In function 'std::string OsString(const OsPath&)':
../../../source/lib/os_path.h:48: warning: comparison between signed and unsigned integer expressions

I checked the system headers and UCHAR_MAX is indeed defined as 0xffU, but it seems wchar_t is actually an int on FreeBSD.

Change History (4)

comment:1 by historic_bruno, 12 years ago

Description: modified (diff)

comment:2 by historic_bruno, 12 years ago

Description: modified (diff)

I didn't pay attention to what the code is actually doing, it's checking if the wchar_t value could fit in an unsigned char.

comment:3 by philip, 12 years ago

Owner: set to philip
Resolution: fixed
Status: newclosed

In 11251:

Fix #1140 (signedness warning on some platforms).

comment:4 by Erik Johansson, 12 years ago

Milestone: BacklogAlpha 9
Note: See TracTickets for help on using tickets.