Skip to content

-Wunused-parameter warnings when cross-compiling for riscv64-linux-gnu #1023

@hebasto

Description

@hebasto

Steps to reproduce on master (fecf436):

$ ./configure --host=riscv64-linux-gnu
$ make clean
$ $ make
  CC       src/bench.o
gcc -DHAVE_CONFIG_H -I. -I./src -O2  -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-overlength-strings -Wall -Wno-unused-function -Wextra -Wcast-align -Wcast-align=strict -fvisibility=hidden -g -O2 -c src/gen_context.c -o gen_context.o
gcc -O2  -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-overlength-strings -Wall -Wno-unused-function -Wextra -Wcast-align -Wcast-align=strict -fvisibility=hidden -g -O2  gen_context.o -o gen_context
./gen_context
  CC       src/libsecp256k1_la-secp256k1.lo
src/secp256k1.c: In function ‘secp256k1_declassify’:
src/secp256k1.c:227:93: warning: unused parameter ‘p’ [-Wunused-parameter]
  227 | static SECP256K1_INLINE void secp256k1_declassify(const secp256k1_context* ctx, const void *p, size_t len) {
      |                                                                                 ~~~~~~~~~~~~^
src/secp256k1.c:227:103: warning: unused parameter ‘len’ [-Wunused-parameter]
  227 | static SECP256K1_INLINE void secp256k1_declassify(const secp256k1_context* ctx, const void *p, size_t len) {
      |                                                                                                ~~~~~~~^~~
  CCLD     libsecp256k1.la
  CCLD     bench
  CC       src/bench_internal-bench_internal.o
  CCLD     bench_internal
  CC       src/bench_ecmult-bench_ecmult.o
  CCLD     bench_ecmult
  CC       src/tests-tests.o
In file included from src/tests.c:17:
src/secp256k1.c: In function ‘secp256k1_declassify’:
src/secp256k1.c:227:93: warning: unused parameter ‘p’ [-Wunused-parameter]
  227 | static SECP256K1_INLINE void secp256k1_declassify(const secp256k1_context* ctx, const void *p, size_t len) {
      |                                                                                 ~~~~~~~~~~~~^
src/secp256k1.c:227:103: warning: unused parameter ‘len’ [-Wunused-parameter]
  227 | static SECP256K1_INLINE void secp256k1_declassify(const secp256k1_context* ctx, const void *p, size_t len) {
      |                                                                                                ~~~~~~~^~~
  CCLD     tests
  CC       src/valgrind_ctime_test.o
  CCLD     valgrind_ctime_test
  CC       src/exhaustive_tests-tests_exhaustive.o
  CCLD     exhaustive_tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions