Ticket #769 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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) (diff)

[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

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

Change History

Changed 2 years ago by nikratio

Testcase

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.

Changed 2 years ago by scoder

  • owner changed from somebody to scoder
  • description modified (diff)

Changed 2 years ago by scoder

  • status changed from new to closed
  • resolution set to fixed

Changed 2 years ago by scoder

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