Const casts.
[pspp] / src / language / tests / float-format.c
index 9e6f777cfc5eb75bf965a25338b6e24c828c0dc2..b2d5a1663f0808a8a6b9a6f09a3527eea61c3b24 100644 (file)
@@ -121,8 +121,9 @@ parse_fp (struct lexer *lexer, struct fp *fp)
         {
           if (length != float_get_size (fp->format))
             {
-              msg (SE, _("%d-byte string needed but %d-byte string supplied."),
-                   (int) float_get_size (fp->format), (int) length);
+              msg (SE, _("%zu-byte string needed but %zu-byte string "
+                         "supplied."),
+                   float_get_size (fp->format), length);
               return false;
             }
           assert (length <= sizeof fp->data);
@@ -135,7 +136,7 @@ parse_fp (struct lexer *lexer, struct fp *fp)
               msg (SE, _("Hexadecimal floating constant too long."));
               return false;
             }
-          strncpy ((char *) fp->data, ds_cstr (lex_tokstr (lexer)), sizeof fp->data);
+          strncpy (CHAR_CAST_BUG (char *,fp->data), ds_cstr (lex_tokstr (lexer)), sizeof fp->data);
         }
 
       lex_get (lexer);