[xsd-users] -Wconversion warnings

Balasubramanyam, Shivakumar sbalasub at qualcomm.com
Wed Dec 15 12:52:14 EST 2010


At the least, the pragmas could be used to hide the issues in CS and let other parts of the code be enabled.
________________________________________
From: xsd-users-bounces at codesynthesis.com [xsd-users-bounces at codesynthesis.com] On Behalf Of Benjamin Schindler [bschindler at inf.ethz.ch]
Sent: Wednesday, December 15, 2010 4:39 AM
To: xsd-users at codesynthesis.com
Subject: [xsd-users] -Wconversion warnings

Hi

We just turned on -Wconversion warnings in our xsd-using project and it
generated a huge numbers of warnings from libxsd, but they are all at
the same place. Could they be fixed please?

libxsd/xsd/cxx/tree/date-time-ostream.txx:31:13: warning: conversion to
‘short int’ from ‘int’ may alter its value
libxsd/xsd/cxx/tree/date-time-ostream.txx:32:13: warning: conversion to
‘short int’ from ‘int’ may alter its value
libxsd/xsd/cxx/tree/serialization/date-time.txx:42:15: warning:
conversion to ‘short int’ from ‘int’ may alter its value
libxsd/xsd/cxx/tree/serialization/date-time.txx:43:15: warning:
conversion to ‘short int’ from ‘int’ may alter its value
libxsd/xsd/cxx/tree/types.txx:571:11: warning: conversion to ‘char’ from
‘int’ may alter its value
libxsd/xsd/cxx/tree/types.txx:521:39: warning: conversion to ‘unsigned
char’ from ‘int’ may alter its value

parsing/date-time.txx has quite a few more.

I agree that these warnings are very pedantic, but I think a template
library should be clean of them as it prevents use of these warning
switches in other projects

Thanks
Benjamin




More information about the xsd-users mailing list