Skip to content

Various build fixes for gcc <= 9.x#60

Open
bkuhls wants to merge 3 commits into
intel:masterfrom
bkuhls:fixgcc9
Open

Various build fixes for gcc <= 9.x#60
bkuhls wants to merge 3 commits into
intel:masterfrom
bkuhls:fixgcc9

Conversation

@bkuhls

@bkuhls bkuhls commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

bkuhls added 3 commits June 20, 2026 14:35
lat_sig.c: In function ‘handler’:
lat_sig.c:23:1: error: parameter name omitted
 void handler(int) { }

lat_sig.c: In function ‘prot’:
lat_sig.c:72:1: error: parameter name omitted
 prot(int) {

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
lat_usleep.c: In function ‘interval’:
lat_usleep.c:102:1: error: parameter name omitted
 interval(int)

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
memsize.c: In function ‘gotalarm’:
memsize.c:154:1: error: parameter name omitted
 gotalarm(int)

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets GCC ≤ 9 build cleanliness by silencing -Wunused-parameter warnings in several signal handler functions.

Changes:

  • Annotate signal handler parameters with __attribute__((unused)) in memsize, lat_usleep, and lat_sig.
  • Rename unused handler parameters to unused to match the new annotation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/memsize.c Marks SIGALRM handler parameter as unused via GCC attribute.
src/lat_usleep.c Marks ITIMER signal handler parameter as unused via GCC attribute.
src/lat_sig.c Marks SIGUSR1/SEGV/BUS handler parameters as unused via GCC attribute.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/memsize.c
Comment on lines 153 to 157
void
gotalarm(int)
gotalarm(__attribute__((unused)) int unused)
{
alarm_triggered = 1;
}
Comment thread src/lat_usleep.c
Comment on lines 101 to 105
void
interval(int)
interval(__attribute__((unused)) int unused)
{
if (++caught == n) {
caught = 0;
Comment thread src/lat_sig.c
uint64 caught, n;
double adj;
void handler(int) { }
void handler(__attribute__((unused)) int unused) { }
Comment thread src/lat_sig.c
Comment on lines 71 to 75
void
prot(int) {
prot(__attribute__((unused)) int unused) {
if (++caught == n) {
caught = 0;
n = benchmp_interval(benchmp_getstate());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants