Commit ee9f6f34 authored by Curtis Gedak's avatar Curtis Gedak
Browse files

Fix mismatched field precision type compiler warning

Inserted cast to int so that third parameter matches expected
parameter precision type.

Original warning:

FileSystem.cc: In member function ‘Glib::ustring
GParted::FileSystem::mk_temp_dir(const Glib::ustring&,
GParted::OperationDetail&)’:
FileSystem.cc:81:69: warning: field precision should have type ‘int’,
but argument 3 has type ‘long unsigned int’
parent 3b76e570
......@@ -78,7 +78,7 @@ Glib::ustring FileSystem::mk_temp_dir( const Glib::ustring & infix, OperationDet
//Secure Programming for Linux and Unix HOWTO, Chapter 6. Avoid Buffer Overflow
// http://tldp.org/HOWTO/Secure-Programs-HOWTO/library-c.html
char dir_buf[4096+1];
sprintf( dir_buf, "%.*s", sizeof(dir_buf)-1, dir_template .c_str() ) ;
sprintf( dir_buf, "%.*s", (int) sizeof(dir_buf)-1, dir_template .c_str() ) ;
//Looks like "mkdir -v" command was run to the user
operationdetail .add_child( OperationDetail(
......
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