mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-01 02:29:03 +00:00
Fix serialdump.c warnings (clang)
Using clang (on osx) yields to some warnings (conversion between signed/unsigned, unused variable) which gcc would only produce when used with -Wall. This commit fixes those.
This commit is contained in:
parent
17714c2111
commit
64c66efd7f
@ -55,7 +55,7 @@ usage(int result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_hex_line(unsigned char *prefix, unsigned char *outbuf, int index)
|
print_hex_line(char *prefix, unsigned char *outbuf, int index)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -92,7 +92,8 @@ main(int argc, char **argv)
|
|||||||
char *speedname = BAUDRATE_S;
|
char *speedname = BAUDRATE_S;
|
||||||
char *device = MODEMDEVICE;
|
char *device = MODEMDEVICE;
|
||||||
char *timeformat = NULL;
|
char *timeformat = NULL;
|
||||||
unsigned char buf[BUFSIZE], outbuf[HCOLS];
|
unsigned char buf[BUFSIZE];
|
||||||
|
char outbuf[HCOLS];
|
||||||
unsigned char mode = MODE_START_TEXT;
|
unsigned char mode = MODE_START_TEXT;
|
||||||
int nfound, flags = 0;
|
int nfound, flags = 0;
|
||||||
unsigned char lastc = '\0';
|
unsigned char lastc = '\0';
|
||||||
@ -273,7 +274,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(FD_ISSET(fd, &smask)) {
|
if(FD_ISSET(fd, &smask)) {
|
||||||
int i, j, n = read(fd, buf, sizeof(buf));
|
int i, n = read(fd, buf, sizeof(buf));
|
||||||
if(n < 0) {
|
if(n < 0) {
|
||||||
perror("could not read");
|
perror("could not read");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user