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 warnings introduced with extra compiler flags requred by TIOBE TICS framework #17

Closed
maartenvds opened this issue Aug 22, 2013 · 5 comments
Assignees

Comments

@maartenvds
Copy link

The additional flags: -W -Wextra -Wconversion -Wshadow -Wcast-qual -Wwrite-strings
Theoretically we should get an A on compiler warnings if all is fixed.
Because portability is important: -Wcast-align should also be added for 16-bit devices

@andreixc
Copy link
Contributor

Most of the issues are conversion warnings.
Keep on tackling them.

@andreixc
Copy link
Contributor

There are a lot of conversions from int to uint16_t and uint32_t and the other way.
These conversions can truncate values, corrupt sign and many more things.
8 bit, 16 bit platforms can suffer from converting uint32_t to int.
all the platforms can encounter sign changes.
The reason why embedded sw usually uses uint8_t,uint16_t,uint32_t, sint8_t, sint16_t, sint32_t is to keep
the code portable between platforms.

@danielinux
Copy link
Contributor

Fixed -Wextra -Wshadow -Wcast-qual -Wwrite-strings

@danielinux
Copy link
Contributor

for this bug to be closed, enable -Wconversion and get rid of all implicit casts, remove int wherever possible (except the public APIs).

@ghost ghost assigned bibireiulian Sep 16, 2013
bibireiulian pushed a commit that referenced this issue Sep 25, 2013
bibireiulian pushed a commit that referenced this issue Sep 25, 2013
bibireiulian pushed a commit that referenced this issue Sep 25, 2013
bibireiulian pushed a commit that referenced this issue Sep 25, 2013
bibireiulian pushed a commit that referenced this issue Sep 25, 2013
bibireiulian pushed a commit that referenced this issue Sep 27, 2013
bibireiulian pushed a commit that referenced this issue Sep 27, 2013
bibireiulian pushed a commit that referenced this issue Sep 30, 2013
bibireiulian pushed a commit that referenced this issue Sep 30, 2013
@bibireiulian
Copy link

From TICS Quality Data Viewer => Compiler warnings Class A.
Issue closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants