Skip to content

gcc编译报错,服务端启动失败 #148

@babynanxi

Description

@babynanxi

inflating: ServerStatus-Hotaru-master/status.sh
gcc -c -Iinclude -Wall -O2 src/argparse.c -o obj/argparse.o
gcc -c -Iinclude -Wall -O2 src/json.c -o obj/json.o
src/json.c: In function ‘new_value’:
src/json.c:140:45: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
140 | value->_reserved.object_mem = ((char **) &value->u.object.values) + values_size;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/json.c: In function ‘json_parse_ex’:
src/json.c:364:27: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
364 | (
(json_char **) &top->u.object.values) += string_length + 1;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -c -Iinclude -Wall -O2 src/system.c -o obj/system.o

系统版本
Linux 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

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