Ticket #1140 (closed defect: fixed)

Opened 16 months ago

Last modified 15 months ago

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:

Description (last modified by historic_bruno) (diff)

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

comment:1 Changed 16 months ago by historic_bruno

  • Description modified (diff)

comment:2 Changed 16 months ago by historic_bruno

  • 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 Changed 15 months ago by philip

  • Owner set to philip
  • Status changed from new to closed
  • Resolution set to fixed

In 11251:

Fix #1140 (signedness warning on some platforms).

comment:4 Changed 15 months ago by feneur

  • Milestone changed from Backlog to Alpha 9
Note: See TracTickets for help on using tickets.