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’
This commit is contained in:
Curtis Gedak 2012-01-12 13:07:37 -07:00
parent 3b76e57084
commit ee9f6f3432
1 changed files with 1 additions and 1 deletions

View File

@ -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(