Skip to content

Commit d7dd9b1

Browse files
committed
example:socket-example: Fix build warning
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent c8c0567 commit d7dd9b1

File tree

1 file changed

+3
-3
lines changed
  • examples/socket-example/src

1 file changed

+3
-3
lines changed

examples/socket-example/src/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ static int status_callback(int id, int event, int err)
130130
return 0;
131131
}
132132

133-
static int recv_callback(int sockid, const unsigned char *buf, int len)
133+
static int recv_callback(int sockid, const void *buf, int len)
134134
{
135135
printf("Data received (%d bytes):\n", len);
136-
printf("%s", buf);
136+
printf("%s", (char *)buf);
137137

138138
return 0;
139139
}
140140

141-
static int xmit_callback(int sockid, int result, unsigned char *buf, int len, void *arg)
141+
static int xmit_callback(int sockid, int result, const void *buf, int len, void *arg)
142142
{
143143
printf("Data send status: %d\n", result);
144144

0 commit comments

Comments
 (0)