Skip to content

Commit

Permalink
Some compiler warnings for Ubuntu 10.04 were eliminated.
Browse files Browse the repository at this point in the history
  • Loading branch information
info committed Nov 22, 2010
1 parent e5e48b7 commit 530713c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
6 changes: 4 additions & 2 deletions yaAGC/DecodeDigitalDownlink.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2005,2009 Ronald S. Burkey <[email protected]>
Copyright 2005,2009-2010 Ronald S. Burkey <[email protected]>
This file is part of yaAGC.
Expand Down Expand Up @@ -56,6 +56,8 @@
default is NULL, in which case PrintDownlinkList
is used. If non-NULL, then whateverit points
to is used in place of PrintDownlinkList.
11/22/10 RSB Eliminated a compiler warning I suddenly
encountered in Ubuntu 10.04.
*/

Expand Down Expand Up @@ -2062,7 +2064,7 @@ DecodeErasableDump (char *Title)
{
int i, j, row, col;
Sclear ();
sprintf (&Sbuffer[0][0], Title);
sprintf (&Sbuffer[0][0], "%s", Title);
sprintf (&Sbuffer[1][0], "ID=%05o SYNC=%05o PASS=%o EBANK=%o TIME1=%05o",
DownlinkListBuffer[0], DownlinkListBuffer[1],
(DownlinkListBuffer[2] >> 11) & 1,
Expand Down
8 changes: 7 additions & 1 deletion yaAGC/nbfgets.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2003-2005,2008-2009 Ronald S. Burkey <[email protected]>
Copyright 2003-2005,2008-2010 Ronald S. Burkey <[email protected]>
This file is part of yaAGC.
Expand Down Expand Up @@ -54,6 +54,8 @@
readline() and rl_getc().
08/02/09 RSB Tried to make it work again without readline
support.
11/22/10 RSB Eliminated a compiler warning I encountered
in Ubuntu 10.04.
*/

#include <pthread.h>
Expand Down Expand Up @@ -273,6 +275,10 @@ static void * nbfgetsThreadFunction (void *Arg)
}
pthread_mutex_unlock(&nbfgetsMutex);
}
// This function doesn't actually return, but I've
// put in the following line to avoid a compiler
// warning in some compiler versions.
return (NULL);
}

// Signals to the thread reading in the input from stdin to actually go
Expand Down
8 changes: 7 additions & 1 deletion yaAGS/nbfgets.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2003-2005,2009 Ronald S. Burkey <[email protected]>
Copyright 2003-2005,2009-2010 Ronald S. Burkey <[email protected]>
This file is part of yaAGC.
Expand Down Expand Up @@ -46,6 +46,8 @@
... undocumented changes apparently occurred here ...
08/01/09 RSB Changed incorrect usage of returned string
from readline(), which could be NULL.
11/22/10 RSB Eliminated a compiler warning I encountered
in Ubuntu 10.04.
*/

#include <pthread.h>
Expand Down Expand Up @@ -193,6 +195,10 @@ nbfgetsThreadFunction (void *Arg)
// Go to sleep until the string has been processed.
pthread_cond_wait (&nbfgetsCond, &nbfgetsMutex);
}
// This function doesn't actually return, but I've
// put in the following line to avoid a compiler
// warning in some compiler versions.
return (NULL);
}

// Signals to the thread reading in the input from stdin to actually go
Expand Down
2 changes: 1 addition & 1 deletion yaYUL/SymbolTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ PrintSymbolsToFile (FILE *fp)
{
fprintf (fp, "\t\t");
if (HtmlOut != NULL)
fprintf (HtmlOut, NormalizeString ("\t"));
fprintf (HtmlOut, "%s", NormalizeString ("\t"));
}
}
fprintf (fp, "\n");
Expand Down

0 comments on commit 530713c

Please sign in to comment.