Skip to content

Conversation

extinguish
Copy link

@extinguish extinguish commented Aug 31, 2023

the sem_open/s-c1.c has build warning, fix the build warning by remove the "static" declaration of "struct row"

Signed-off-by: guoshichao [email protected]

ltp/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c ltp/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c:415:1: warning: useless storage class specifier in empty declaration
  415 | };
      | ^

Signed-off-by: guoshichao <[email protected]>
@extinguish extinguish changed the title ltp: fix the testcase build warning open_posix: fix the testcase of sem_open/s-c1.c build warning Sep 1, 2023
@richiejp richiejp added the posix POSIX conformance test suite label Nov 24, 2023
@metan-ucw
Copy link
Member

This is obviously correct, but I do get a few more errors when trying to compile the test.

../../../stress/threads/sem_open/s-c1.c: In function ‘main’:
../../../stress/threads/sem_open/s-c1.c:114:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
  114 | int main(int argc, char *argv[])
      |          ~~~~^~~~
../../../stress/threads/sem_open/s-c1.c:114:26: warning: unused parameter ‘argv’ [-Wunused-parameter]
  114 | int main(int argc, char *argv[])
      |                    ~~~~~~^~~~~~

The main should be defined as int main(void) and it fails to compile too because of missing -lm for me, I guess that it's missing LDLIBS file with -lm somewhere.

Can you please fix these two problems too?

@pevik pevik force-pushed the master branch 6 times, most recently from acb468e to dc9ba89 Compare February 7, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

posix POSIX conformance test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants