Commit 29f5fbb7 authored by dickelbeck's avatar dickelbeck

quiet the newer g++ compilers, which complain about certain stdio function's...

quiet the newer g++ compilers, which complain about certain stdio function's return values not being used
parent fd521f37
...@@ -407,6 +407,7 @@ bool WinEDA_App::SetBinDir() ...@@ -407,6 +407,7 @@ bool WinEDA_App::SetBinDir()
char FileName[1024]; char FileName[1024];
wxString str_arg0; wxString str_arg0;
int ii; int ii;
char* res;
FileName[0] = 0; FileName[0] = 0;
str_arg0 = argv[0]; str_arg0 = argv[0];
...@@ -417,7 +418,7 @@ bool WinEDA_App::SetBinDir() ...@@ -417,7 +418,7 @@ bool WinEDA_App::SetBinDir()
if( ( ftmp = fopen( TMP_FILE, "rt" ) ) != NULL ) if( ( ftmp = fopen( TMP_FILE, "rt" ) ) != NULL )
{ {
(void) fgets( Line, 1000, ftmp ); res = fgets( Line, 1000, ftmp );
fclose( ftmp ); fclose( ftmp );
remove( TMP_FILE ); remove( TMP_FILE );
} }
......
...@@ -51,6 +51,7 @@ bool LoadFootprintFiles( const wxArrayString& libNames, ...@@ -51,6 +51,7 @@ bool LoadFootprintFiles( const wxArrayString& libNames,
FOOTPRINT* ItemLib; FOOTPRINT* ItemLib;
unsigned i; unsigned i;
wxString tmp, msg; wxString tmp, msg;
char* result;
/* Check if footprint list is not empty */ /* Check if footprint list is not empty */
if( !list.empty() ) if( !list.empty() )
...@@ -90,7 +91,7 @@ bool LoadFootprintFiles( const wxArrayString& libNames, ...@@ -90,7 +91,7 @@ bool LoadFootprintFiles( const wxArrayString& libNames,
} }
/* Check if library type is valid */ /* Check if library type is valid */
(void) fgets( buffer, 32, file ); result = fgets( buffer, 32, file );
if( strncmp( buffer, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 ) if( strncmp( buffer, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 )
{ {
s_files_invalid << tmp << _(" (Not a Kicad file)") << wxT("\n"); s_files_invalid << tmp << _(" (Not a Kicad file)") << wxT("\n");
......
...@@ -96,6 +96,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -96,6 +96,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
char* ptchar; char* ptchar;
COMPONENT* Cmp; COMPONENT* Cmp;
FILE* source; FILE* source;
char* result;
m_modified = false; m_modified = false;
m_isEESchemaNetlist = false; m_isEESchemaNetlist = false;
...@@ -118,7 +119,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -118,7 +119,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
/* Read the file header (must be "( { OrCAD PCB" or "({ OrCAD PCB" ) /* Read the file header (must be "( { OrCAD PCB" or "({ OrCAD PCB" )
* or "# EESchema Netliste" * or "# EESchema Netliste"
*/ */
(void) fgets( Line, BUFFER_CHAR_SIZE, source ); result = fgets( Line, BUFFER_CHAR_SIZE, source );
/* test for netlist type PCB2 */ /* test for netlist type PCB2 */
i = strnicmp( Line, "( {", 3 ); i = strnicmp( Line, "( {", 3 );
if( i != 0 ) if( i != 0 )
......
...@@ -240,6 +240,7 @@ int main( int argc, char* argv[] ) ...@@ -240,6 +240,7 @@ int main( int argc, char* argv[] )
{ {
int len; int len;
int dot_found = 0; int dot_found = 0;
int ret;
zipok = 1; zipok = 1;
strncpy( filename_try, argv[zipfilenamearg], MAXFILENAME ); strncpy( filename_try, argv[zipfilenamearg], MAXFILENAME );
...@@ -270,7 +271,7 @@ int main( int argc, char* argv[] ) ...@@ -270,7 +271,7 @@ int main( int argc, char* argv[] )
char answer[128]; char answer[128];
printf( "The file %s exist. Overwrite ? [y]es, [n]o, [a]ppend : ", printf( "The file %s exist. Overwrite ? [y]es, [n]o, [a]ppend : ",
filename_try ); filename_try );
(void) scanf( "%1s", answer ); ret = scanf( "%1s", answer );
rep = answer[0]; rep = answer[0];
if( (rep>='a') && (rep<='z') ) if( (rep>='a') && (rep<='z') )
rep -= 0x20; rep -= 0x20;
......
...@@ -157,6 +157,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference, ...@@ -157,6 +157,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference,
FILE* FichCmp, * NewFile; FILE* FichCmp, * NewFile;
char Line[1024]; char Line[1024];
wxString msg; wxString msg;
char* result; // quiet compiler
if( old_name == new_name ) if( old_name == new_name )
return 0; /* pas de changement de nom */ return 0; /* pas de changement de nom */
...@@ -192,7 +193,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference, ...@@ -192,7 +193,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference,
return 1; return 1;
} }
(void) fgets( Line, sizeof(Line), FichCmp ); result = fgets( Line, sizeof(Line), FichCmp );
fprintf( NewFile, "Cmp-Mod V01 Genere par PcbNew le %s\n", fprintf( NewFile, "Cmp-Mod V01 Genere par PcbNew le %s\n",
DateAndTime( Line ) ); DateAndTime( Line ) );
...@@ -571,6 +572,7 @@ void WinEDA_PcbFrame::RecreateCmpFileFromBoard( wxCommandEvent& aEvent ) ...@@ -571,6 +572,7 @@ void WinEDA_PcbFrame::RecreateCmpFileFromBoard( wxCommandEvent& aEvent )
MODULE* Module = GetBoard()->m_Modules; MODULE* Module = GetBoard()->m_Modules;
wxString msg; wxString msg;
wxString wildcard; wxString wildcard;
char* result; // quiet compiler
if( Module == NULL ) if( Module == NULL )
{ {
...@@ -601,7 +603,7 @@ void WinEDA_PcbFrame::RecreateCmpFileFromBoard( wxCommandEvent& aEvent ) ...@@ -601,7 +603,7 @@ void WinEDA_PcbFrame::RecreateCmpFileFromBoard( wxCommandEvent& aEvent )
return; return;
} }
(void) fgets( Line, sizeof(Line), FichCmp ); result = fgets( Line, sizeof(Line), FichCmp );
fprintf( FichCmp, "Cmp-Mod V01 Genere par PcbNew le %s\n", fprintf( FichCmp, "Cmp-Mod V01 Genere par PcbNew le %s\n",
DateAndTime( Line ) ); DateAndTime( Line ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment