]> git.ozlabs.org Git - yaboot.git/commitdiff
warnings: Add explict prototype for prom_vfprintf()
authorTony Breeds <tony@bakeyournoodle.com>
Tue, 18 Oct 2011 00:19:23 +0000 (11:19 +1100)
committerTony Breeds <tony@bakeyournoodle.com>
Tue, 18 Oct 2011 04:11:10 +0000 (15:11 +1100)
Also update GCC format attributes

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
include/prom.h
second/prom.c

index 62e65480810e79f3654823ce5af04226adff99d9..0462e395367290a99d9555dcabd1ff005500cd8e 100644 (file)
@@ -74,15 +74,16 @@ void prom_putchar (char);
 int prom_nbgetchar();
 
 #ifdef __GNUC__
-void prom_vprintf (char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
-void prom_fprintf (prom_handle dev, char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
-void prom_printf (char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
-void prom_debug (char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+void prom_vprintf (const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
+void prom_vfprintf (prom_handle file, const char *fmt, va_list ap)  __attribute__ ((format (printf, 2, 0)));
+void prom_fprintf (prom_handle dev, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
+void prom_printf (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+void prom_debug (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
 #else
-void prom_vprintf (char *fmt, va_list ap);
-void prom_fprintf (prom_handle dev, char *fmt, ...);
-void prom_printf (char *fmt, ...);
-void prom_debug (char *fmt, ...);
+void prom_vprintf (const char *fmt, va_list ap);
+void prom_fprintf (prom_handle dev, const char *fmt, ...);
+void prom_printf (const char *fmt, ...);
+void prom_debug (const char *fmt, ...);
 #endif
 
 void prom_perror (int error, char *filename);
index 51870d910423e5147a0e2ed88e6e60d1739d2c7b..a9918840b30c899ba1e541955430c2f69a653b84 100644 (file)
@@ -439,7 +439,7 @@ prom_puts (prom_handle file, char *s)
 }
 
 void
-prom_vfprintf (prom_handle file, char *fmt, va_list ap)
+prom_vfprintf (prom_handle file, const char *fmt, va_list ap)
 {
      static char printf_buf[2048];
      vsprintf (printf_buf, fmt, ap);
@@ -447,7 +447,7 @@ prom_vfprintf (prom_handle file, char *fmt, va_list ap)
 }
 
 void
-prom_vprintf (char *fmt, va_list ap)
+prom_vprintf (const char *fmt, va_list ap)
 {
      static char printf_buf[2048];
      vsprintf (printf_buf, fmt, ap);
@@ -455,7 +455,7 @@ prom_vprintf (char *fmt, va_list ap)
 }
 
 void
-prom_fprintf (prom_handle file, char *fmt, ...)
+prom_fprintf (prom_handle file, const char *fmt, ...)
 {
      va_list ap;
      va_start (ap, fmt);
@@ -464,7 +464,7 @@ prom_fprintf (prom_handle file, char *fmt, ...)
 }
 
 void
-prom_printf (char *fmt, ...)
+prom_printf (const char *fmt, ...)
 {
      va_list ap;
      va_start (ap, fmt);
@@ -473,7 +473,7 @@ prom_printf (char *fmt, ...)
 }
 
 void
-prom_debug (char *fmt, ...)
+prom_debug (const char *fmt, ...)
 {
      va_list ap;