Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
JIRA: RTOS-792
  • Loading branch information
lukileczo authored and agkaminski committed Mar 27, 2024
1 parent e0b34d3 commit c52c569
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/devs.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int dev_close(id_t id);
int dev_read(id_t id, void *data, size_t size, size_t offset);


int dev_write(id_t id, void *data, size_t size, size_t offset);
int dev_write(id_t id, const void *data, size_t size, size_t offset);


#endif /* PHOENIX_DEVS_H_ */
2 changes: 1 addition & 1 deletion include/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int pf_filterIn(struct pbuf *pbuf, struct netif *netif);
int pf_filterOut(struct pbuf *pbuf, struct netif *netif);


int pf_rulesUpdate(pfrule_array_t *array);
int pf_rulesUpdate(const pfrule_array_t *array);


void init_filters(void);
Expand Down
6 changes: 3 additions & 3 deletions port/devs.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,9 @@ static int pf_close(void)
}


static int pf_write(char *data, size_t size)
static int pf_write(const void *data, size_t size)
{
pfrule_array_t *input = (pfrule_array_t *)data;
const pfrule_array_t *input = data;

if (input == NULL || !size || size != input->len * sizeof(pfrule_t) + sizeof(pfrule_array_t))
return -EINVAL;
Expand Down Expand Up @@ -714,7 +714,7 @@ int dev_read(id_t id, void *data, size_t size, size_t offset)
}


int dev_write(id_t id, void *data, size_t size, size_t offset)
int dev_write(id_t id, const void *data, size_t size, size_t offset)
{
switch (id) {
#if LWIP_ROUTE_DEV
Expand Down
2 changes: 1 addition & 1 deletion port/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static int _pf_processRule(pfrule_t *rule)
}


int pf_rulesUpdate(pfrule_array_t *array)
int pf_rulesUpdate(const pfrule_array_t *array)
{
pfrule_t *newlist = NULL, *listhead = NULL, *newrule;
size_t i;
Expand Down
2 changes: 1 addition & 1 deletion port/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ static void socketsrv_thread(void *arg)
int err, sock, type;
#if LWIP_DNS
struct addrinfo hint = { 0 };
char *node, *serv;
const char *node, *serv;
#endif

port = (unsigned)arg;
Expand Down
2 changes: 1 addition & 1 deletion wi-fi/lwip/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ static int wifi_dev_read(char *data, size_t size, off_t offset)
}


static int wifi_dev_write(char *data, size_t size)
static int wifi_dev_write(const char *data, size_t size)
{
if (size >= 8 && strncmp("timeout ", data, 8) == 0) {
wifi_ap_set_idle_timeout(data + 8, size - 8);
Expand Down

0 comments on commit c52c569

Please sign in to comment.