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

sanitycheck fails with gcc 7 as the host compiler #5732

Closed
nashif opened this issue Jan 18, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@nashif
Copy link
Member

commented Jan 18, 2018

GCC enabled new warnings by default which causes some tests to fail when build the native posix board, the warnings need to be addressed.

@nashif nashif added the bug label Jan 18, 2018

@nashif nashif self-assigned this Jan 19, 2018

@aescolar

This comment has been minimized.

Copy link
Contributor

commented Jan 19, 2018

In which file/line is this warning appearing and with what gcc version?

@nashif

This comment has been minimized.

Copy link
Member Author

commented Jan 24, 2018

this is the sprintf test

nashif added a commit to nashif/zephyr that referenced this issue Jan 24, 2018

native: ignore format-truncation warnings (REVERTME)
This is enabled by default in GCC 7, disable for now. Tracked in
issue zephyrproject-rtos#5732

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

nashif added a commit that referenced this issue Jan 24, 2018

native: ignore format-truncation warnings (REVERTME)
This is enabled by default in GCC 7, disable for now. Tracked in
issue #5732

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

iha added a commit to iha/zephyr that referenced this issue Feb 19, 2018

native: ignore format-truncation warnings (REVERTME)
This is enabled by default in GCC 7, disable for now. Tracked in
issue zephyrproject-rtos#5732

Signed-off-by: Anas Nashif <anas.nashif@intel.com>

aescolar added a commit to aescolar/zephyr that referenced this issue Jun 27, 2018

tests: sprintf: suppress Wformat-truncation warning
GCC 7 and newer are smart enough to realize that in test_snprintf()
the output will not fit in 0 or 4 bytes, but that it requires 9.
So it throws a warning in compile time. But in this case we are
actually testing that snprintf's return value is what it should be
while truncating the output. So let's suppress this warning here.

Fixes: zephyrproject-rtos#5732

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>

aescolar added a commit to aescolar/zephyr that referenced this issue Jun 27, 2018

native: Do not ignore format-truncation warnings
Reverting 5124711
as issue zephyrproject-rtos#5732 is no more.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>

aescolar added a commit to aescolar/zephyr that referenced this issue Jun 28, 2018

tests: sprintf: suppress Wformat-truncation warning
GCC 7 and newer are smart enough to realize that in test_snprintf()
the output will not fit in 0 or 4 bytes, but that it requires 9.
So it throws a warning in compile time. But in this case we are
actually testing that snprintf's return value is what it should be
while truncating the output. So let's suppress this warning here.

Fixes: zephyrproject-rtos#5732

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>

aescolar added a commit to aescolar/zephyr that referenced this issue Jun 28, 2018

native: Do not ignore format-truncation warnings
Reverting 5124711
as issue zephyrproject-rtos#5732 is no more.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>

aescolar added a commit to aescolar/zephyr that referenced this issue Jun 28, 2018

tests: sprintf: suppress Wformat-truncation warning
GCC 7 and newer are smart enough to realize that in test_snprintf()
the output will not fit in 0 or 4 bytes, but that it requires 9.
So it throws a warning in compile time. But in this case we are
actually testing that snprintf's return value is what it should be
while truncating the output. So let's suppress this warning here.

Fixes: zephyrproject-rtos#5732

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>

aescolar added a commit to aescolar/zephyr that referenced this issue Jun 28, 2018

native: Do not ignore format-truncation warnings
Reverting 5124711
as issue zephyrproject-rtos#5732 is no more.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>

carlescufi added a commit that referenced this issue Jun 28, 2018

native: Do not ignore format-truncation warnings
Reverting 5124711
as issue #5732 is no more.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>

fallrisk added a commit to fallrisk/zephyr that referenced this issue Aug 19, 2018

tests: sprintf: suppress Wformat-truncation warning
GCC 7 and newer are smart enough to realize that in test_snprintf()
the output will not fit in 0 or 4 bytes, but that it requires 9.
So it throws a warning in compile time. But in this case we are
actually testing that snprintf's return value is what it should be
while truncating the output. So let's suppress this warning here.

Fixes: zephyrproject-rtos#5732

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>

fallrisk added a commit to fallrisk/zephyr that referenced this issue Aug 19, 2018

native: Do not ignore format-truncation warnings
Reverting 5124711
as issue zephyrproject-rtos#5732 is no more.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
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.