Skip to content

Error during make on centos 7.6 #2

@Michaelikus

Description

@Michaelikus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions