Nmap Development mailing list archives

[PATCH] Add '__attribute__ ((format (printf, 1, 2)))' to nmapfe_error.h


From: Kris Katterjohn <kjak () ispwest com>
Date: Fri, 22 Sep 2006 14:23:03 -0500

The attached patch adds "__attribute__ ((format (printf, 1, 2)))" to the
error functions in nmapfe_error.h like the ones in nmap_error.h.

Also, nmap_error.h needs to have the same "#ifndef __attribute__" as
nmapfe_error.h (in patch) and NmapOutputTable.h does, but I didn't know
whether you'd prefer #including NmapOutputTable.h or adding another
#ifndef to nmap_error.h.

It's a diff against 4.20ALPHA7

Thanks,
Kris Katterjohn
--- x/nmapfe/nmapfe_error.h     2006-08-24 20:47:59.000000000 -0500
+++ y/nmapfe/nmapfe_error.h     2006-09-22 14:13:03.000000000 -0500
@@ -115,8 +115,13 @@
 #include <unistd.h>
 #endif
 
-void fatal(char *fmt, ...);
-void error(char *fmt, ...);
-void pfatal(char *err, ...);
+#ifndef __attribute__
+#define __attribute__(args)
+#endif
+
+void fatal(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+void error(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+void pfatal(char *err, ...) __attribute__ ((format (printf, 1, 2)));
+
 #endif /* NMAPFE_ERROR_H */
 

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: