about summary refs log tree commit diff
path: root/elf/tst-unique1.c
diff options
context:
space:
mode:
authorYang Yanchao <yangyanchao6@huawei.com>2022-04-15 17:25:05 +0800
committerFlorian Weimer <fweimer@redhat.com>2022-06-28 10:28:48 +0200
commit5e89ed42fd8997414732525c9460878d65363b3f (patch)
treea28e4e4a09ecef3257f56fdc54d531dd1f2f70a5 /elf/tst-unique1.c
parentcfdc4df66ce1464611e1b508f7a5a8f38afd5337 (diff)
downloadglibc-5e89ed42fd8997414732525c9460878d65363b3f.tar.gz
glibc-5e89ed42fd8997414732525c9460878d65363b3f.tar.xz
glibc-5e89ed42fd8997414732525c9460878d65363b3f.zip
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.
Diffstat (limited to 'elf/tst-unique1.c')
0 files changed, 0 insertions, 0 deletions