Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#769 closed defect (fixed)

gcc "unused parameter" warnings in generated C code for classes

Reported by: nikratio Owned by: scoder
Priority: major Milestone: 0.17
Component: Code Generation Keywords:
Cc: nikratio

Description (last modified by scoder)

[0] vostro:~/tmp# Cython-0.16/bin/cython test.pyx 
[0] vostro:~/tmp# Cython-0.16/bin/cython --version
Cython version 0.16
[0] vostro:~/tmp# gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c test.c  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -DFUSE_USE_VERSION=28 -DLLFUSE_VERSION="0.37.1" -Werror -Wall -Wextra -Wconversion -Wno-sign-conversion -fno-strict-aliasing -DHAVE_STRUCT_STAT_ST_ATIM -o test.o
test.c: In function ‘__pyx_tp_new_4test_Lock’:
test.c:703:69: error: unused parameter ‘a’ [-Werror=unused-parameter]
test.c:703:82: error: unused parameter ‘k’ [-Werror=unused-parameter]
cc1: all warnings being treated as errors

It'd be nice if these were suppressed by Cython.

Attachments (1)

test.pyx (354 bytes) - added by nikratio 2 years ago.
Testcase

Download all attachments as: .zip

Change History (5)

Changed 2 years ago by nikratio

Testcase

comment:1 Changed 2 years ago by nikratio

Sorry for the messed up formatting, another attempt:

[0] vostro:~/tmp# Cython-0.16/bin/cython --version
Cython version 0.16
[0] vostro:~/tmp# Cython-0.16/bin/cython test.pyx 
[0] vostro:~/tmp# gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c test.c  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -DFUSE_USE_VERSION=28 -DLLFUSE_VERSION="0.37.1" -Werror -Wall -Wextra -Wconversion -Wno-sign-conversion -fno-strict-aliasing -DHAVE_STRUCT_STAT_ST_ATIM -o test.o
test.c: In function ‘__pyx_tp_new_4test_Lock’:
test.c:703:69: error: unused parameter ‘a’ [-Werror=unused-parameter]
test.c:703:82: error: unused parameter ‘k’ [-Werror=unused-parameter]
cc1: all warnings being treated as errors

Thanks for Cython! It's an amazing tool.

comment:2 Changed 2 years ago by scoder

  • Description modified (diff)
  • Owner changed from somebody to scoder

comment:3 Changed 2 years ago by scoder

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed 2 years ago by scoder

  • Milestone changed from wishlist to 0.17
Note: See TracTickets for help on using tickets.