Skip to content
Commit 5e89ed42 authored by Yang Yanchao's avatar Yang Yanchao Committed by Florian Weimer
Browse files

elf: Fix compile error with -Werror and -DNDEBUG

Using -Werror and -DNDEBUG at the same time will trigger the
following compiler error:

cache.c: In function 'save_cache':
cache.c:758:15: error: unused variable 'old_offset' [-Werror=unused-variable]
  758 |       off64_t old_offset = lseek64 (fd, extension_offset, SEEK_SET);
      |               ^~~~~~~~~~

-DNDEBUG disables the assertion, making old_offset unused.
Use __attribute__ ((unused)) to disable this warning.
parent cfdc4df6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment