[PATCH:mkfontscale] Add _X_ATTRIBUTE_PRINTF to functions taking printf format arguments

Jeremy Huddleston jeremyhu at apple.com
Tue May 24 09:38:46 PDT 2011


Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On May 23, 2011, at 18:34, Alan Coopersmith wrote:

> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
> list.h |    8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/list.h b/list.h
> index 463933d..686fd9b 100644
> --- a/list.h
> +++ b/list.h
> @@ -23,7 +23,9 @@
> #ifndef _MKS_LIST_H_
> #define _MKS_LIST_H_ 1
> 
> -char *dsprintf(char *f, ...);
> +#include <X11/Xfuncproto.h> /* for _X_ATTRIBUTE_PRINTF */
> +
> +char *dsprintf(char *f, ...) _X_ATTRIBUTE_PRINTF(1,2);
> 
> typedef struct _List {
>     char *value;
> @@ -33,8 +35,8 @@ typedef struct _List {
> int listMember(char *elt, ListPtr list);
> ListPtr listCons(char *car, ListPtr cdr);
> ListPtr listAdjoin(char *car, ListPtr cdr);
> -ListPtr listConsF(ListPtr cdr, char *f, ...);
> -ListPtr listAdjoinF(ListPtr cdr, char *f, ...);
> +ListPtr listConsF(ListPtr cdr, char *f, ...) _X_ATTRIBUTE_PRINTF(2,3);
> +ListPtr listAdjoinF(ListPtr cdr, char *f, ...) _X_ATTRIBUTE_PRINTF(2,3);
> int listLength(ListPtr list);
> ListPtr appendList(ListPtr first, ListPtr second);
> ListPtr makeList(char **a, int n, ListPtr old, int begin);
> -- 
> 1.7.3.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 



More information about the xorg-devel mailing list