[xsd-users] -Wconversion warnings

Benjamin Schindler bschindler at inf.ethz.ch
Wed Dec 15 07:39:46 EST 2010


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