Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings about narrowing conversion #57

Merged
merged 1 commit into from Jul 17, 2014

Conversation

Projects
None yet
2 participants
@ribbons
Copy link
Contributor

commented Jul 17, 2014

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.

Fix compiler warnings about narrowing conversion
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

Merge pull request #57 from ribbons/compiler-warnings
Fix compiler warnings about narrowing conversion

@unwiredben unwiredben merged commit 3631af8 into sirleech:master Jul 17, 2014

@ribbons ribbons deleted the ribbons:compiler-warnings branch Jul 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.