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

Error during make on centos 7.6 #2

Open
Michaelikus opened this issue Jun 10, 2019 · 1 comment
Open

Error during make on centos 7.6 #2

Michaelikus opened this issue Jun 10, 2019 · 1 comment

Comments

@Michaelikus
Copy link

gcc -o iterative 01_iterative/main.c
01_iterative/main.c: In function ‘redis_list_get_range’:
01_iterative/main.c:252:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < returned_items; i++) {
^
01_iterative/main.c:252:5: note: use option -std=c99 or -std=gnu99 to compile your code
01_iterative/main.c: In function ‘redis_free_array_result’:
01_iterative/main.c:291:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < length; i++) {
^
01_iterative/main.c: In function ‘render_guestbook_template’:
01_iterative/main.c:535:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < entries_count; i++) {
^
make: *** [iterative] Error 1

@Michaelikus
Copy link
Author

solved by add -std=c99

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

1 participant