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
Merged

Fix compiler warnings about narrowing conversion #57

merged 1 commit into from Jul 17, 2014

Conversation

@ribbons
Copy link
Contributor

@ribbons ribbons 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.

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 issue 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 Jul 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants