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

compile error #752

Closed
ruanyubiao opened this issue Jun 12, 2024 · 2 comments
Closed

compile error #752

ruanyubiao opened this issue Jun 12, 2024 · 2 comments

Comments

@ruanyubiao
Copy link

ruanyubiao commented Jun 12, 2024

master branch compilation error.

modbus.c: In function ‘read_io_status’:
modbus.c:1202:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (unsigned int i = offset; i < offset_end; i++) {
^
modbus.c:1202:9: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 t o compile your code
make[2]: *** [Makefile:484: modbus.lo] Error 1
make[1]: *** [Makefile:498: all-recursive] Error 1
make: *** [Makefile:384: all] Error 2

@karlp
Copy link
Contributor

karlp commented Jun 12, 2024

time for you to update your compiler to one that defaults to c99.... :)

stephane added a commit that referenced this issue Jul 17, 2024
@stephane
Copy link
Owner

I'm agree with @karlp however that's the only place where a loop initial declaration is used so I edited this line.

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

No branches or pull requests

3 participants