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

clang compiler warnings on Travis #77129

Closed
tiran opened this issue Feb 25, 2018 · 2 comments
Closed

clang compiler warnings on Travis #77129

tiran opened this issue Feb 25, 2018 · 2 comments
Labels
build The build process and cross-build extension-modules C modules in the Modules dir

Comments

@tiran
Copy link
Member

tiran commented Feb 25, 2018

BPO 32948
Nosy @tiran, @iritkatriel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2021-06-22.22:06:11.116>
created_at = <Date 2018-02-25.13:28:39.310>
labels = ['extension-modules', 'build']
title = 'clang compiler warnings on Travis'
updated_at = <Date 2021-06-22.22:06:11.115>
user = 'https://github.com/tiran'

bugs.python.org fields:

activity = <Date 2021-06-22.22:06:11.115>
actor = 'iritkatriel'
assignee = 'none'
closed = True
closed_date = <Date 2021-06-22.22:06:11.116>
closer = 'iritkatriel'
components = ['Extension Modules']
creation = <Date 2018-02-25.13:28:39.310>
creator = 'christian.heimes'
dependencies = []
files = []
hgrepos = []
issue_num = 32948
keywords = []
message_count = 2.0
messages = ['312810', '396368']
nosy_count = 2.0
nosy_names = ['christian.heimes', 'iritkatriel']
pr_nums = []
priority = 'low'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue32948'
versions = ['Python 2.7']

@tiran
Copy link
Member Author

tiran commented Feb 25, 2018

I'm seeing a bunch of compile errors on 2.7 branch, https://travis-ci.org/python/cpython/jobs/345906584

/home/travis/build/python/cpython/Modules/_heapqmodule.c:600:21: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
[explanation by Fran<E7>ois Pinard]\n\
                    ^~~~
Include/Python.h:174:60: note: expanded from macro 'PyDoc_STRVAR'
#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
                                                           ^
Include/Python.h:176:24: note: expanded from macro 'PyDoc_STR'
#define PyDoc_STR(str) str
                       ^
1 warning generated.

clang -pthread -fno-strict-aliasing -OPT:Olimit=0 -g -O2 -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/pwdmodule.c -o Modules/pwdmodule.o
./Modules/posixmodule.c:363:13: warning: comparison of constant 9223372036854775807 with expression of type 'uid_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare]
if (uid <= LONG_MAX)
~~~ ^ ~~~~~~~~
./Modules/posixmodule.c:371:13: warning: comparison of constant 9223372036854775807 with expression of type 'gid_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare]
if (gid <= LONG_MAX)
~~~ ^ ~~~~~~~~
clang -pthread -fno-strict-aliasing -OPT:Olimit=0 -g -O2 -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_sre.c -o Modules/_sre.o
clang -pthread -fno-strict-aliasing -OPT:Olimit=0 -g -O2 -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_codecsmodule.c -o Modules/_codecsmodule.o
./Modules/pwdmodule.c:115:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if (uid < 0)
~~~ ^ ~
1 warning generated.

/home/travis/build/python/cpython/Modules/grpmodule.c:102:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if (gid < 0)
~~~ ^ ~
1 warning generated.

/cpython/Modules/nismodule.c -o build/temp.linux-x86_64-2.7-pydebug/home/travis/build/python/cpython/Modules/nismodule.o
/home/travis/build/python/cpython/Modules/nismodule.c:404:15: warning: 
      explicitly assigning value of variable of type 'nismaplist *' (aka
      'struct nismaplist *') to itself [-Wself-assign]
    for (maps = maps; maps; maps = maps->next) {
         ~~~~ ^ ~~~~
1 warning generated.

/cpython/Modules/_cursesmodule.c -o build/temp.linux-x86_64-2.7-pydebug/home/travis/build/python/cpython/Modules/_cursesmodule.o
/home/travis/build/python/cpython/Modules/_cursesmodule.c:1082:15: warning: 
      implicit conversion from 'chtype' (aka 'unsigned long') to 'int' changes
      value from 18446744073709551615 to -1 [-Wconstant-conversion]
        rtn = mvwinch(self->win,y,x);
            ~ ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/curses.h:1247:58: note: expanded from macro 'mvwinch'
  ...(wmove((win),(y),(x)) == ERR ? NCURSES_CAST(chtype, ERR) : winch(win))
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/curses.h:222:34: note: expanded from macro 'NCURSES_CAST'
#define NCURSES_CAST(type,value) (type)(value)
                                 ^~~~~~~~~~~~~
1 warning generated.

@tiran tiran added extension-modules C modules in the Modules dir build The build process and cross-build labels Feb 25, 2018
@iritkatriel
Copy link
Member

2.7-specific issue.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build extension-modules C modules in the Modules dir
Projects
None yet
Development

No branches or pull requests

2 participants