Modify

Ticket #2543 (closed Bugs: fixed)

Opened 5 years ago

Last modified 5 years ago

path.hpp:947: warning: comparison between signed and unsigned integer expressions

Reported by: christian.leutloff@… Owned by: bemandawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.37.0 Severity: Problem
Keywords: path, compiler, warning Cc:

Description

Including boost/filesystem.hpp leads to this warning (repeated some more times for other lines of code):

path.hpp:947: warning: comparison between signed and unsigned integer expressions

The compiler is gcc 4.2.3 build for QNX 6. It is executed under WinXP.

I'm using boost 1.35. But I have verified that the relevant code sections in path.hpp are unchanged in svn boost/trunk as of Nov. 25. Therefore I would assume that this problem is present in newer versions of boost, too. In version 1.33.1 this problem was not present.

The warning is "fixed" through a typecast from the colon<value_type> to (typename string_type::value_type). This applies for slash, too.

I'm not sure that the typecast is the right solution. But at least it works for me ...

I'll attach the diff against boost version 1.35 to show the affected lines of code. If useful I am willing to move the changes or modified changes to trunk, too. Please drop me a note if it would be helpful.

Many many thanks to all the people bringing boost to me! It is a great to be able to use this powerful lib.

Attachments

path_hpp_boost_135.patch Download (7.5 KB) - added by christian.leutloff@… 5 years ago.

Change History

Changed 5 years ago by christian.leutloff@…

comment:1 Changed 5 years ago by bemandawes

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

Hopefully this has now been fixed by revision 50556.

Since none of the compilers I use issue the warning, please reopen the issue if your compiler still warns.

--Beman

comment:2 Changed 5 years ago by basilevs@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

I'm using: boost 1.37 mingw with gcc 1.34 stlport 5.2.1

All these errors appear again.

comment:3 Changed 5 years ago by bemandawes

  • Status changed from reopened to closed
  • Resolution set to fixed

The fix wasn't in 1.37. The first release with the fix was 1.38.

If there is any further report of signed vs unsigned comparison warning, please include full information on the version of all software involved, and a copy of one of the warnings.

Thanks,

--Beman

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.