Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions drvrfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,8 +1038,8 @@ int stream_open(char *filename, int rwmode, int *handle)
/*
read from stdin
*/
if (filename)
rwmode = 1; /* dummy statement to suppress unused parameter compiler warning */
(void)filename; /* suppress unused parameter compiler warning */
(void)rwmode; /* suppress unused parameter compiler warning */

*handle = 1; /* 1 = stdin */

Expand All @@ -1052,10 +1052,8 @@ int stream_create(char *filename, int *handle)
write to stdout
*/

if (filename) /* dummy statement to suppress unused parameter compiler warning */
*handle = 2;
else
*handle = 2; /* 2 = stdout */
(void)filename; /* suppress unused parameter compiler warning */
*handle = 2; /* 2 = stdout */

return(0);
}
Expand All @@ -1065,7 +1063,7 @@ int stream_size(int handle, LONGLONG *filesize)
return the size of the file in bytes
*/
{
handle = 0; /* suppress unused parameter compiler warning */
(void)handle; /* suppress unused parameter compiler warning */

/* this operation is not supported in a stream; return large value */
*filesize = LONG_MAX;
Expand All @@ -1077,7 +1075,7 @@ int stream_close(int handle)
don't have to close stdin or stdout
*/
{
handle = 0; /* suppress unused parameter compiler warning */
(void)handle; /* suppress unused parameter compiler warning */

return(0);
}
Expand All @@ -1098,7 +1096,8 @@ int stream_seek(int handle, LONGLONG offset)
seeking is not allowed in a stream
*/
{
offset = handle; /* suppress unused parameter compiler warning */
(void)offset; /* suppress unused parameter compiler warning */
(void)handle; /* suppress unused parameter compiler warning */
return(1);
}
/*--------------------------------------------------------------------------*/
Expand Down
8 changes: 8 additions & 0 deletions drvrgsiftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ static void done_cb( void * user_arg,
globus_ftp_client_handle_t * handle,
globus_object_t * err)
{
(void)user_arg; /* suppress unused parameter compiler warning */
(void)handle; /* suppress unused parameter compiler warning */

if(err){
fprintf(stderr, "%s", globus_object_printable_to_string(err));
Expand All @@ -252,6 +254,8 @@ static void data_cb_read( void * user_arg,
globus_off_t offset,
globus_bool_t eof)
{
(void)offset; /* suppress unused parameter compiler warning */

if(err) {
fprintf(stderr, "%s", globus_object_printable_to_string(err));
}
Expand Down Expand Up @@ -283,6 +287,10 @@ static void data_cb_write( void * user_arg,
globus_bool_t eof)
{
int curr_offset;

(void)length; /* suppress unused parameter compiler warning */
(void)offset; /* suppress unused parameter compiler warning */

if(err) {
fprintf(stderr, "%s", globus_object_printable_to_string(err));
}
Expand Down
10 changes: 9 additions & 1 deletion drvrmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ int mem_create(char *filename, int *handle)
{
int status;

(void)filename; /* suppress unused parameter compiler warning */

/* initially allocate 1 FITS block = 2880 bytes */
status = mem_createmem(2880L, handle);

Expand Down Expand Up @@ -294,11 +296,12 @@ int stdin_checkfile(char *urltype, char *infile, char *outfile)
do any special case checking when opening a file on the stdin stream
*/
{
(void)infile; /* suppress unused parameter compiler warning */
if (strlen(outfile))
{
stdin_outfile[0] = '\0';
strncat(stdin_outfile,outfile,FLEN_FILENAME-1); /* an output file is specified */
strcpy(urltype,"stdinfile://");
strcpy(urltype,"stdinfile://");
}
else
*stdin_outfile = '\0'; /* no output file was specified */
Expand Down Expand Up @@ -559,6 +562,7 @@ int mem_compress_openrw(char *filename, int rwmode, int *hdl)
the memory 'file' to be opened with READWRITE access.
*/
{
(void)rwmode; /* suppress unused parameter compiler warning */
return(mem_compress_open(filename, READONLY, hdl));
}
/*--------------------------------------------------------------------------*/
Expand Down Expand Up @@ -806,6 +810,8 @@ int mem_iraf_open(char *filename, int rwmode, int *hdl)
int status;
size_t filesize = 0;

(void)rwmode; /* suppress unused parameter compiler warning */

/* create a memory file with size = 0 for the FITS converted IRAF file */
status = mem_createmem(filesize, hdl);
if (status)
Expand Down Expand Up @@ -1289,6 +1295,8 @@ void bzip2uncompress2mem(char *filename, FILE *diskfile, int hdl,
size_t total_read = 0;
char* errormsg = NULL;

(void)filename; /* suppress unused parameter compiler warning */

*filesize = 0;
*status = 0;
b = BZ2_bzReadOpen(&bzerror, diskfile, 0, 0, NULL, 0);
Expand Down
11 changes: 10 additions & 1 deletion drvrnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,10 @@ int curlProgressCallback(void *clientp, double dltotal, double dlnow,
char *urlname=0;
static int isComplete = 0;
static int isFirst = 1;


(void)ultotal; /* suppress unused parameter compiler warning */
(void)ulnow; /* suppress unused parameter compiler warning */

/* isFirst is true the very first time this is entered. Afterwards it
should get reset to true when isComplete is first detected to have
toggled from true to false. */
Expand Down Expand Up @@ -3704,6 +3707,9 @@ int http_checkfile (char *urltype, char *infile, char *outfile1)
/*--------------------------------------------------------------------------*/
int https_checkfile (char *urltype, char *infile, char *outfile1)
{

(void)infile; /* suppress unused parameter compiler warning */

/* set default */
strcpy(urltype,"https://");

Expand All @@ -3728,6 +3734,9 @@ int https_checkfile (char *urltype, char *infile, char *outfile1)
/*--------------------------------------------------------------------------*/
int ftps_checkfile (char *urltype, char *infile, char *outfile1)
{

(void)infile; /* suppress unused parameter compiler warning */

strcpy(urltype,"ftps://");
if (strlen(outfile1))
{
Expand Down
2 changes: 1 addition & 1 deletion drvrsmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ int smem_shutdown(void)
}

int smem_setoptions(int option)
{ option = 0;
{ (void)option; /* suppress unused parameter compiler warning */
return(0);
}

Expand Down
1 change: 1 addition & 0 deletions eval.l
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ int yywrap(yyscan_t scanner)
pre-2.5.1 versions of flex which
do not recognize %option noyywrap
*/
(void)scanner; /* suppress unused parameter compiler warning */
return(1);
}

Expand Down
6 changes: 4 additions & 2 deletions eval.y
Original file line number Diff line number Diff line change
Expand Up @@ -5387,7 +5387,7 @@ static void Do_Deref( ParseData *lParse, Node *this )
if( this->type==STRING )
this->value.undef[row] = theVar->value.undef[row];
else if( this->type==BITSTR )
this->value.undef; /* Dummy - BITSTRs do not have undefs */
(void)this->value.undef; /* Dummy - BITSTRs do not have undefs */
else
this->value.undef[row] = theVar->value.undef[elem];

Expand Down Expand Up @@ -5481,7 +5481,7 @@ static void Do_Deref( ParseData *lParse, Node *this )
if( this->type==STRING )
this->value.undef[row] = theVar->value.undef[row];
else if( this->type==BITSTR )
this->value.undef; /* Dummy - BITSTRs do not have undefs */
(void)this->value.undef; /* Dummy - BITSTRs do not have undefs */
else
this->value.undef[row] = theVar->value.undef[elem];

Expand Down Expand Up @@ -6393,6 +6393,8 @@ static void yyerror(yyscan_t scanner, ParseData *lParse, char *s)
{
char msg[80];

(void)scanner; /* suppress unused parameter compiler warning */

if( !lParse->status ) lParse->status = PARSE_SYNTAX_ERR;

strncpy(msg, s, 80);
Expand Down
5 changes: 5 additions & 0 deletions eval_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,11 @@ int ffffrw_work(long totalrows, /* I - Total rows to be processed */
ffffrw_workdata *workData = userPtr;
ParseData *lParse = workData->lParse;

(void)totalrows; /* suppress unused parameter compiler warning */
(void)offset; /* suppress unused parameter compiler warning */
(void)nCols; /* suppress unused parameter compiler warning */
(void)colData; /* suppress unused parameter compiler warning */

Evaluate_Parser( lParse, firstrow, nrows );

if( !lParse->status ) {
Expand Down
11 changes: 6 additions & 5 deletions eval_l.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#line 1 "eval_l.c"
#line 2 "eval_l.c"

#line 3 "eval_l.c"
#line 4 "eval_l.c"

#define YY_INT_ALIGNED short int

Expand Down Expand Up @@ -922,8 +922,8 @@ static int expr_read( ParseData *lParse, char *buf, int nbytes );
if ( (result = expr_read( yylParse, (char *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "read() in flex scanner failed" );

#line 925 "eval_l.c"
#line 926 "eval_l.c"
#line 927 "eval_l.c"

#define INITIAL 0

Expand Down Expand Up @@ -1200,7 +1200,7 @@ YY_DECL
#line 158 "eval.l"


#line 1203 "eval_l.c"
#line 1204 "eval_l.c"

while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
Expand Down Expand Up @@ -1691,7 +1691,7 @@ YY_RULE_SETUP
#line 474 "eval.l"
ECHO;
YY_BREAK
#line 1694 "eval_l.c"
#line 1695 "eval_l.c"
case YY_STATE_EOF(INITIAL):
yyterminate();

Expand Down Expand Up @@ -2882,6 +2882,7 @@ int yywrap(yyscan_t scanner)
pre-2.5.1 versions of flex which
do not recognize %option noyywrap
*/
(void)scanner; /* suppress unused parameter compiler warning */
return(1);
}

Expand Down
6 changes: 4 additions & 2 deletions eval_y.c
Original file line number Diff line number Diff line change
Expand Up @@ -7625,7 +7625,7 @@ static void Do_Deref( ParseData *lParse, Node *this )
if( this->type==STRING )
this->value.undef[row] = theVar->value.undef[row];
else if( this->type==BITSTR )
this->value.undef; /* Dummy - BITSTRs do not have undefs */
(void)this->value.undef; /* Dummy - BITSTRs do not have undefs */
else
this->value.undef[row] = theVar->value.undef[elem];

Expand Down Expand Up @@ -7719,7 +7719,7 @@ static void Do_Deref( ParseData *lParse, Node *this )
if( this->type==STRING )
this->value.undef[row] = theVar->value.undef[row];
else if( this->type==BITSTR )
this->value.undef; /* Dummy - BITSTRs do not have undefs */
(void)this->value.undef; /* Dummy - BITSTRs do not have undefs */
else
this->value.undef[row] = theVar->value.undef[elem];

Expand Down Expand Up @@ -8631,6 +8631,8 @@ static void yyerror(yyscan_t scanner, ParseData *lParse, char *s)
{
char msg[80];

(void)scanner; /* suppress unused parameter compiler warning */

if( !lParse->status ) lParse->status = PARSE_SYNTAX_ERR;

strncpy(msg, s, 80);
Expand Down
4 changes: 4 additions & 0 deletions f77_wrap1.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ FCALLSCSUB3(Cffreopen,FTREOPEN,ftreopen,FITSUNIT,PFITSUNIT,PINT)
void Cffinit( fitsfile **fptr, const char *filename, int blocksize, int *status );
void Cffinit( fitsfile **fptr, const char *filename, int blocksize, int *status )
{
(void)blocksize; /* suppress unused parameter compiler warning */

if( *fptr==NULL || *fptr==(fitsfile*)1 ) {
ffinit( fptr, filename, status );
} else {
Expand All @@ -249,6 +251,8 @@ FCALLSCSUB4(Cffinit,FTINIT,ftinit,PFITSUNIT,STRING,INT,PINT)
void Cffdkinit( fitsfile **fptr, const char *filename, int blocksize, int *status );
void Cffdkinit( fitsfile **fptr, const char *filename, int blocksize, int *status )
{
(void)blocksize; /* suppress unused parameter compiler warning */

if( *fptr==NULL || *fptr==(fitsfile*)1 ) {
ffdkinit( fptr, filename, status );
} else {
Expand Down
2 changes: 2 additions & 0 deletions fitscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -2493,6 +2493,8 @@ then values of 'n' less than or equal to n_value will match.
int ip, ic, pat, pass = 0, firstfail;
char *spat;

(void)naxis; /* suppress unused parameter compiler warning */

if (*status > 0)
return(*status);

Expand Down
9 changes: 9 additions & 0 deletions histo.c
Original file line number Diff line number Diff line change
Expand Up @@ -3028,6 +3028,12 @@ int ffwritehisto(long totaln, long pixoffset, long firstn, long nvalues,
long rows_per_loop = 0, offset = 0;
histType *histData;

(void)totaln; /* suppress unused parameter compiler warning */
(void)pixoffset; /* suppress unused parameter compiler warning */
(void)firstn; /* suppress unused parameter compiler warning */
(void)nvalues; /* suppress unused parameter compiler warning */
(void)narrays; /* suppress unused parameter compiler warning */

histData = (histType *)userPointer;

/* store pointer to the histogram array, and initialize to zero */
Expand Down Expand Up @@ -3076,6 +3082,9 @@ int ffcalchist(long totalrows, long offset, long firstrow, long nrows,
int status = 0;
long irow;

(void)ncols; /* suppress unused parameter compiler warning */
(void)colpars; /* suppress unused parameter compiler warning */

if (firstrow == 1) {
histData->rowselector_cur = histData->rowselector;
}
Expand Down
Loading