]> git.donarmstrong.com Git - lilypond.git/commitdiff
use __attribute__ format(printf)
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 29 Nov 2006 14:02:15 +0000 (15:02 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 29 Nov 2006 14:02:15 +0000 (15:02 +0100)
flower/include/file-cookie.hh
flower/include/libc-extension.hh
flower/include/string-convert.hh
lily/ttf.cc

index ab163ea3eb3d8c20ef7b1680de936424c0880510..ab2558fd14730d34adb1508d62fe51f5d66d116f 100644 (file)
@@ -24,7 +24,8 @@ using namespace std;
                          lily_cookie_io_functions_t io_funcs);
 
   int lily_cookie_fclose (void *);
-  int lily_cookie_fprintf (void *file, char const *format, ...);
+  int lily_cookie_fprintf (void *file, char const *format, ...)
+    __attribute__ ((format (printf, 2, 3)));
   int lily_cookie_putc (int c, void *file);
 
 #ifdef __cplusplus
index da4291604c2c0e94d66146e1c9a39c04ac18fbd2..236b731d8a12e9828316a9fdcd022193ce05789d 100644 (file)
@@ -37,6 +37,7 @@ double my_round (double);
   
 #if ! HAVE_SNPRINTF            /* GNU extension. */
 int snprintf (char *str, size_t n, char const *format, ...);
+ __attribute__ ((format (printf, 3, 4)));
 #endif
 
 #if ! HAVE_VSNPRINTF           /* GNU extension. */
index 4717bfc49bfd71998312e8c3cf9c809f507ac94d..64e23e0f8baab623ea05c46497d59a77cf69d128 100644 (file)
@@ -31,7 +31,7 @@ public:
   static int dec2int (string dec_string);
   static double dec2double (string dec_string);
   static string double_string (double f, char const *fmt = 0);
-  static string form_string (char const *format, ...);
+  static string form_string (char const *format, ...) __attribute__ ((format (printf, 1,2)));
   static string vform_string (char const *format, va_list args);
   static int hex2int (string str);
   static unsigned hex2unsigned (string str);
index 0e5526f8e1727a7b5d3bbc79f2f562652fe2fe86..8dfa7308f7e8f9a37439949e94172273623bf3a7 100644 (file)
@@ -53,7 +53,7 @@ print_header (void *out, FT_Face face)
     = (TT_Postscript *) FT_Get_Sfnt_Table (face, ft_sfnt_post);
 
   if (pt->maxMemType42)
-    lily_cookie_fprintf (out, "%%%%VMUsage: %ld %ld\n", 0, 0);
+    lily_cookie_fprintf (out, "%%%%VMUsage: %d %d\n", 0, 0);
 
   lily_cookie_fprintf (out, "%d dict begin\n", 11);
   lily_cookie_fprintf (out, "/FontName /%s def\n",
@@ -75,8 +75,8 @@ print_header (void *out, FT_Face face)
   lily_cookie_fprintf (out, "/FontType 42 def\n");
   lily_cookie_fprintf (out, "/FontInfo 8 dict dup begin\n");
   lily_cookie_fprintf (out, "/version (%d.%d) def\n",
-                      (ht->Font_Revision >> 16),
-                      (ht->Font_Revision &((1 << 16) -1)));
+                      int (ht->Font_Revision >> 16),
+                      int (ht->Font_Revision &((1 << 16) -1)));
 
 #if 0
   if (strings[0])