Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open_posix: fix the testcase of sem_open/s-c1.c build warning #1073

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 guoshichao@xiaomi.com

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 <guoshichao@xiaomi.com>
@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?

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.

None yet

3 participants