Fixed error with cmake not taking build flags
This commit is contained in:
@ -25,6 +25,7 @@ static error_t parse_opt(int key, char* arg, struct argp_state* state) {
|
||||
break;
|
||||
case ARG_TTL:
|
||||
arguments->ttl = strtoul(arg, NULL, 10);
|
||||
__attribute__ ((fallthrough));
|
||||
case ARGP_KEY_ARG:
|
||||
if (state->arg_num >= 2)
|
||||
argp_usage(state);
|
||||
@ -40,7 +41,7 @@ static error_t parse_opt(int key, char* arg, struct argp_state* state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct argp argp = {options, parse_opt, args_doc, doc};
|
||||
static struct argp argp = {options, parse_opt, args_doc, doc, NULL, NULL, NULL};
|
||||
|
||||
static bool stop = false;
|
||||
|
||||
@ -58,7 +59,7 @@ double avg = 0;
|
||||
uint16_t calc_checksum(void * b, const size_t l) {
|
||||
uint16_t sum = 0;
|
||||
|
||||
for (int i = 0; i < l; i++) {
|
||||
for (size_t i = 0; i < l; i++) {
|
||||
sum += *((uint16_t*)b + i);
|
||||
}
|
||||
|
||||
@ -72,7 +73,7 @@ void send_ping() {
|
||||
packet.hdr.un.echo.id = getpid();
|
||||
packet.hdr.un.echo.sequence = xmit++;
|
||||
|
||||
for (int i = 0; i < sizeof(packet.msg) - 1; ++i) {
|
||||
for (long unsigned i = 0; i < sizeof(packet.msg) - 1; ++i) {
|
||||
packet.msg[i] = (char)i;
|
||||
}
|
||||
packet.msg[sizeof(packet.msg) - 1] = '\0';
|
||||
|
Reference in New Issue
Block a user