Skip to content

Commit

Permalink
Cleanup compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjko committed Feb 25, 2024
1 parent 0f2cd3e commit f9f55e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ int json_to_config(cJSON *config, struct brickpico_config *cfg)
cJSON *ref, *item;
int id;
const char *name, *val;
uint32_t m;


if (!config || !cfg)
return -1;
Expand Down Expand Up @@ -460,6 +460,7 @@ int json_to_config(cJSON *config, struct brickpico_config *cfg)
cfg->mqtt_pwm_interval = cJSON_GetNumberValue(ref);
}
if ((ref = cJSON_GetObjectItem(config, "mqtt_pwm_mask"))) {
uint32_t m;
if (!str_to_bitmask(cJSON_GetStringValue(ref), OUTPUT_COUNT, &m, 1))
cfg->mqtt_pwm_mask = m;
}
Expand Down
1 change: 1 addition & 0 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <wctype.h>
#include <assert.h>
Expand Down

0 comments on commit f9f55e0

Please sign in to comment.