Fix type-cast in page_layout_reader.cpp
The wksFile.Read() call returns a size_t which is then compared with a int. Make the filelen variable a size_t to make sure it is of the correct width. Fixes the following warning: kicad/common/page_layout/page_layout_reader.cpp: In member function ‘void WS_DATA_MODEL::SetPageLayout(const wxString&, bool)’: kicad/common/page_layout/page_layout_reader.cpp:853:41: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 853 | if( wksFile.Read( buffer, filelen ) != filelen )
This commit is contained in:
parent
6b2be25086
commit
651e7f664d
|
@ -847,7 +847,7 @@ void WS_DATA_MODEL::SetPageLayout( const wxString& aFullFileName, bool Append )
|
|||
return;
|
||||
}
|
||||
|
||||
int filelen = wksFile.Length();
|
||||
size_t filelen = wksFile.Length();
|
||||
char * buffer = new char[filelen+10];
|
||||
|
||||
if( wksFile.Read( buffer, filelen ) != filelen )
|
||||
|
|
Loading…
Reference in New Issue