Skip to content

Commit

Permalink
Merge pull request #1 from mikey75/master
Browse files Browse the repository at this point in the history
Fixed compiler warnings: __FUNCTION__ needs __extension__ since -std=gnu99 is used.
  • Loading branch information
TheMontezuma committed Jan 19, 2016
2 parents e9983c8 + ead87cd commit 653b36f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sio2bsd.c
Expand Up @@ -714,7 +714,7 @@ com_read(uchar *buf, int size, const ushort type)
r = read(serial_fd, buf+i, 1);
if (r < 0)
{
printf("FATAL: %s(): %s (%d)\n", __FUNCTION__, strerror(errno), errno);
printf("FATAL: %s(): %s (%d)\n", __extension__ __FUNCTION__, strerror(errno), errno);
sig(0);
}
i += r;
Expand All @@ -732,7 +732,7 @@ com_read(uchar *buf, int size, const ushort type)
r = read(serial_fd, buf+i, 1);
if (r < 0)
{
printf("FATAL: %s(): %s (%d)\n", __FUNCTION__, strerror(errno), errno);
printf("FATAL: %s(): %s (%d)\n", __extension__ __FUNCTION__, strerror(errno), errno);
sig(0);
}
# ifdef COMMAND_LINE
Expand Down Expand Up @@ -834,7 +834,7 @@ com_write(uchar *buf, int size)
r = write(serial_fd, buf, size);
if (r < 0)
{
printf("FATAL: %s(): %s (%d)\n", __FUNCTION__, strerror(errno), errno);
printf("FATAL: %s(): %s (%d)\n", __extension__ __FUNCTION__, strerror(errno), errno);
sig(0);
}
i += r;
Expand Down Expand Up @@ -1008,7 +1008,7 @@ atr_open(char *fname, int full13force)

if ((r = stat(fname, &sb)) < 0)
{
printf("Error: %s() cannot stat() '%s', %s (%d)\n", __FUNCTION__, fname, strerror(errno), errno);
printf("Error: %s() cannot stat() '%s', %s (%d)\n", __extension__ __FUNCTION__, fname, strerror(errno), errno);
return -1;
}

Expand Down Expand Up @@ -1276,7 +1276,7 @@ format_atr(ushort d, int no_delay)
if (d)
sio_ack(3, d, 'E');

printf("Error: %s() failed\n", __FUNCTION__);
printf("Error: %s() failed\n", __extension__ __FUNCTION__);
}

static int
Expand Down Expand Up @@ -1941,7 +1941,7 @@ check_dos_name(char *newpath, struct dirent *dp, struct stat *sb)
strcpy(fname, dp->d_name);

if (log_flag)
printf("%s: got fname '%s'\n", __FUNCTION__, fname);
printf("%s: got fname '%s'\n", __extension__ __FUNCTION__, fname);

if (validate_dos_name(fname))
return 1;
Expand All @@ -1950,7 +1950,7 @@ check_dos_name(char *newpath, struct dirent *dp, struct stat *sb)
sprintf(temp_fspec, "%s/%s", newpath, fname);

if (log_flag)
printf("%s: stat '%s'\n", __FUNCTION__, temp_fspec);
printf("%s: stat '%s'\n", __extension__ __FUNCTION__, temp_fspec);

if (stat(temp_fspec, sb))
return 1;
Expand Down Expand Up @@ -2678,7 +2678,7 @@ do_pclink(uchar devno, uchar ccom, uchar caux1, uchar caux2)
iodesc[handle].fppos = newpos;
else
{
if (newpos <= iodesc[handle].fpstat.st_size)
if (newpos <= (ulong)iodesc[handle].fpstat.st_size)
iodesc[handle].fppos = newpos;
else
device[devno][cunit].status.err = 166;
Expand Down

0 comments on commit 653b36f

Please sign in to comment.