Boost logo

Boost :

Subject: [boost] [units] gcc warnings
From: Jürgen Hunold (juergen.hunold_at_[hidden])
Date: 2010-06-15 06:07:09


Hi !

I start using Boost.Units for a new project and found some annyoing warnings
when compiling with "-Wall -Wextra" and "-Wconversion"

The message is:

/home/hunold/src/devel/boost/boost/units/io.hpp: In function ‘int
boost::units::get_flags(std::ios_base&, int)’:
/home/hunold/src/devel/boost/boost/units/io.hpp:163: warning: conversion to
‘int’ from ‘long int’ may alter its value [-Wconversion]

Patch using an explicit static_cast<int> for the return value attached.

Ok to commit ? Other suggestions ?

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        ! www.ivembh.de
* 
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk