Merge pull request #1329 from tsparber/serialdump-fix-warnings

Fix serialdump.c warnings (clang)
This commit is contained in:
Nicolas Tsiftes 2015-11-02 13:59:21 +01:00
commit 2e07e1fc48

View file

@ -55,7 +55,7 @@ usage(int result)
}
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;
@ -92,7 +92,8 @@ main(int argc, char **argv)
char *speedname = BAUDRATE_S;
char *device = MODEMDEVICE;
char *timeformat = NULL;
unsigned char buf[BUFSIZE], outbuf[HCOLS];
unsigned char buf[BUFSIZE];
char outbuf[HCOLS];
unsigned char mode = MODE_START_TEXT;
int nfound, flags = 0;
unsigned char lastc = '\0';
@ -273,7 +274,7 @@ main(int argc, char **argv)
}
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) {
perror("could not read");
exit(-1);