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

input/output test code is broken #847

Closed
tthsqe12 opened this issue Oct 16, 2020 · 1 comment · Fixed by #870
Closed

input/output test code is broken #847

tthsqe12 opened this issue Oct 16, 2020 · 1 comment · Fixed by #870
Milestone

Comments

@tthsqe12
Copy link
Contributor

After c7272e0
compilation of fmpz/test/t-out_inp_raw.c gives warnings and then crashes.

    CC   ../build/fmpz/test/t-out_inp_raw
test/t-out_inp_raw.c: In function ‘main’:
test/t-out_inp_raw.c:71:19: warning: implicit declaration of function ‘fdopen’; did you mean ‘fopen’? [-Wimplicit-function-declaration]
   71 |             out = fdopen(fd[1], "w");
      |                   ^~~~~~
      |                   fopen
test/t-out_inp_raw.c:71:17: warning: assignment to ‘FILE *’ {aka ‘struct _IO_FILE *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   71 |             out = fdopen(fd[1], "w");
      |                 ^
test/t-out_inp_raw.c:103:16: warning: assignment to ‘FILE *’ {aka ‘struct _IO_FILE *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  103 |             in = fdopen(fd[0], "r");
      |                ^
out_raw/inp_raw....make[1]: *** [../Makefile.subdirs:97: ../build/fmpz/test/t-out_inp_raw_RUN] Segmentation fault (core dumped)
@wbhart
Copy link
Collaborator

wbhart commented Oct 16, 2020

Does the problem go away if that line is placed in fmpz.h?

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 a pull request may close this issue.

2 participants