Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h alert.h util.h Log Message: Add some checking of printf style prototypes. =================================================================== RCS file: /cvs/e/e16/e/src/E.h,v retrieving revision 1.604 retrieving revision 1.605 diff -u -3 -r1.604 -r1.605 --- E.h 13 Feb 2008 21:31:28 -0000 1.604 +++ E.h 23 Feb 2008 11:52:43 -0000 1.605 @@ -596,10 +596,10 @@ int ThemeConfigLoad(void); /* dialog.c */ -void DialogOK(const char *title, const char *fmt, ...); +void __PRINTF_2__ DialogOK(const char *title, const char *fmt, ...); void DialogOKstr(const char *title, const char *txt); -void DialogAlert(const char *fmt, ...); -void DialogAlertOK(const char *fmt, ...); +void __PRINTF__ DialogAlert(const char *fmt, ...); +void __PRINTF__ DialogAlertOK(const char *fmt, ...); /* econfig.c */ void ConfigurationLoad(void); =================================================================== RCS file: /cvs/e/e16/e/src/alert.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- alert.h 13 Jan 2007 19:14:26 -0000 1.2 +++ alert.h 23 Feb 2008 11:52:44 -0000 1.3 @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2007 Kim Woelders + * Copyright (C) 2004-2008 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -24,9 +24,11 @@ #ifndef _ALERT_H_ #define _ALERT_H_ +#include "util.h" + /* alert.c */ -void Alert(const char *fmt, ...); -void AlertX(const char *title, const char *ignore, +void __PRINTF__ Alert(const char *fmt, ...); +void __PRINTF_5__ AlertX(const char *title, const char *ignore, const char *restart, const char *quit, const char *fmt, ...); =================================================================== RCS file: /cvs/e/e16/e/src/util.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- util.h 12 Sep 2007 21:33:50 -0000 1.13 +++ util.h 23 Feb 2008 11:52:44 -0000 1.14 @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2007 Kim Woelders + * Copyright (C) 2004-2008 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -37,10 +37,13 @@ #endif #if HAVE___ATTRIBUTE__ -#define __PRINTF__ __attribute__((__format__(__printf__, 1, 2))) +#define __PRINTF_N__(no) __attribute__((__format__(__printf__, (no), (no)+1))) #else -#define __PRINTF__ +#define __PRINTF_N__(no) #endif +#define __PRINTF__ __PRINTF_N__(1) +#define __PRINTF_2__ __PRINTF_N__(2) +#define __PRINTF_5__ __PRINTF_N__(5) #if HAVE_STRDUP #define USE_LIBC_STRDUP 1 /* Use libc strdup if present */ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs