Skip to content

Fix compiler warnings about narrowing conversion - #57

Merged
unwiredben merged 1 commit into
sirleech:masterfrom
ribbons:compiler-warnings
Jul 17, 2014
Merged

Fix compiler warnings about narrowing conversion#57
unwiredben merged 1 commit into
sirleech:masterfrom
ribbons:compiler-warnings

Conversation

@ribbons

@ribbons ribbons commented Jul 17, 2014

Copy link
Copy Markdown
Contributor

The latest 1.5.7 beta release of Arduino includes an updated toolchain which now issues warnings about narrowing of ints to chars inside curly braces becoming ill-formed in C++11 if warnings are enabled.

For example:

Webduino/WebServer.h:995:35: warning: narrowing conversion of 'ch1' from 'int' to 'char' inside { } is ill-formed in C++11 [-Wnarrowing]

The commit below explicitly casts the values to char to prevent these warnings being emitted.

The latest 1.5.7 beta release of Arduino includes an updated toolchain
which now issues warnings about narrowing of ints to chars inside curly
braces becoming ill-formed in C++11.  Explicitly cast the values to char
to prevent this.
unwiredben added a commit that referenced this pull request Jul 17, 2014
Fix compiler warnings about narrowing conversion
@unwiredben
unwiredben merged commit 3631af8 into sirleech:master Jul 17, 2014
@ribbons
ribbons deleted the compiler-warnings branch July 19, 2014 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants