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 when building with GCC8 #44

Closed
wants to merge 2 commits into from

Conversation

mbdevpl
Copy link
Contributor

@mbdevpl mbdevpl commented Apr 20, 2019

This is a fix for #45 and #43, however, from taking a look at output from Travis CI, it's incompatible with GCC 4.8.

cc -O3 -Wall -Wextra -Werror -std=gnu99 -MD -MP -I include   -c -o src/./file.o src/./file.c
src/./file.c: In function ‘ofc_file_get_position’:
src/./file.c:288:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
     if (file->strz[i + 1] == '\n') i++;
        ^
src/./file.c:289:4: note: here
    case '\n':
    ^~~~
cc1: all warnings being treated as errors
cc -O3 -Wall -Wextra -Werror -std=gnu99 -MD -MP -I include   -c -o src/sema/typeval.o src/sema/typeval.c
src/sema/typeval.c: In function ‘ofc_sema_typeval_cast.part.4’:
src/sema/typeval.c:1396:11: error: ‘tv.<Uf390>.integer’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if ((tv.integer < -128)
         ~~^~~~~~~~
src/sema/typeval.c:1321:12: error: ‘tv.<Uf390>.integer’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     if ((tv.integer < -imax)
          ~~^~~~~~~~
cc1: all warnings being treated as errors
@ben-brewer-codethink
Copy link
Member

Sorry for the very late response to this, have merged these patches manually with some others now needed for compilation in 2023.

@mbdevpl
Copy link
Contributor Author

mbdevpl commented Jan 17, 2023

Thank you, glad to have helped here!

@mbdevpl mbdevpl deleted the gcc8-warnings branch January 17, 2023 00:29
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.

None yet

2 participants