LaRCsim cleanup of -Wformat-contains-nul compilation warnings.
The sprintf() function automatically adds the terminating null character, so no need to have it in the formatting string.
This commit is contained in:
parent
13b05db6f9
commit
cf9e3e7bf0
1 changed files with 2 additions and 2 deletions
|
@ -295,8 +295,8 @@ void ls_stamp( void ) {
|
||||||
date = (nowtime->tm_year % 100)*10000
|
date = (nowtime->tm_year % 100)*10000
|
||||||
+ (nowtime->tm_mon + 1)*100
|
+ (nowtime->tm_mon + 1)*100
|
||||||
+ (nowtime->tm_mday);
|
+ (nowtime->tm_mday);
|
||||||
sprintf(sim_control_.date_string, "%06ld\0", date);
|
sprintf(sim_control_.date_string, "%06ld", date);
|
||||||
sprintf(sim_control_.time_stamp, "%02d:%02d:%02d\0",
|
sprintf(sim_control_.time_stamp, "%02d:%02d:%02d",
|
||||||
nowtime->tm_hour, nowtime->tm_min, nowtime->tm_sec);
|
nowtime->tm_hour, nowtime->tm_min, nowtime->tm_sec);
|
||||||
#ifdef COMPILE_THIS_CODE_THIS_USELESS_CODE
|
#ifdef COMPILE_THIS_CODE_THIS_USELESS_CODE
|
||||||
cuserid( sim_control_.userid ); /* set up user id */
|
cuserid( sim_control_.userid ); /* set up user id */
|
||||||
|
|
Loading…
Reference in a new issue