]> sourceware.org Git - systemtap.git/commit
Avoid -Werror=old-style-declaration for stap_probes array in generated kernel modules
authorWilliam Cohen <wcohen@redhat.com>
Mon, 3 Jun 2024 18:40:04 +0000 (14:40 -0400)
committerWilliam Cohen <wcohen@redhat.com>
Tue, 4 Jun 2024 14:07:34 +0000 (10:07 -0400)
commitde8aba9a414b497d98c489173b878058c4031b39
treef095746ac4d21c4452f92701b4e82227104d9228
parentda72d04303cfc3ba22b2bb58a26f8dc7868333eb
Avoid -Werror=old-style-declaration for stap_probes array in generated kernel modules

With newer linux kernels additional compilers checks are being done
and will get error messages like the following for the generated
module:

/tmp/stapuundLy/stap_2755fca707746de04395c85872aae4b8_1753_src.c:111:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
  111 | } static stap_probes[];
      | ^
cc1: all warnings being treated as errors

Tweaked the code generation in translate.cxx to output the static
stap_probes array in a form that is agreeable to newer kernel builds.
translate.cxx
This page took 0.026417 seconds and 5 git commands to generate.