]> git.mxchange.org Git - flightgear.git/commitdiff
LaRCsim cleanup of -Wformat-contains-nul compilation warnings.
authorEdward d'Auvergne <edward@nmr-relax.com>
Thu, 10 Dec 2015 08:13:34 +0000 (09:13 +0100)
committerEdward d'Auvergne <edward@nmr-relax.com>
Thu, 10 Dec 2015 08:13:34 +0000 (09:13 +0100)
The sprintf() function automatically adds the terminating null character, so no
need to have it in the formatting string.

src/FDM/LaRCsim/ls_interface.c

index 3ac0cb2a3b4b6e04c1949af57ae164bd7cb2d83d..c7dd065162253747b265d267251064ce579d00a5 100644 (file)
@@ -295,8 +295,8 @@ void ls_stamp( void ) {
     date = (nowtime->tm_year % 100)*10000
         + (nowtime->tm_mon + 1)*100
         + (nowtime->tm_mday);
-    sprintf(sim_control_.date_string, "%06ld\0", date);
-    sprintf(sim_control_.time_stamp, "%02d:%02d:%02d\0", 
+    sprintf(sim_control_.date_string, "%06ld", date);
+    sprintf(sim_control_.time_stamp, "%02d:%02d:%02d", 
        nowtime->tm_hour, nowtime->tm_min, nowtime->tm_sec);
 #ifdef COMPILE_THIS_CODE_THIS_USELESS_CODE
     cuserid( sim_control_.userid );    /* set up user id */