From b93cc629a0d0803c55e26ab1b7303d1f7c346977 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 9 Jul 2009 13:18:22 +0000 Subject: [PATCH] VIPS_BUF_STATIC() does not take length arg --- ChangeLog | 1 + include/vips/buf.h | 4 ++-- libsrc/iofuncs/error.c | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ecd3364e..20bb91ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ - added "fail" option to im_jpeg2vips: fail with an error on any warning (thank you Ole) - im_buildlut() could segv for non-zero based tables (thanks Jack) +- VIPS_BUF_STATIC() does not take length arg 25/3/09 started 7.18.0 - revised version numbers diff --git a/include/vips/buf.h b/include/vips/buf.h index 45476e34..46df7029 100644 --- a/include/vips/buf.h +++ b/include/vips/buf.h @@ -48,8 +48,8 @@ typedef struct { /* Static init of one of these. */ -#define VIPS_BUF_STATIC( TEXT, MAX ) \ - { &TEXT[0], MAX, 0, FALSE, 0, FALSE } +#define VIPS_BUF_STATIC( TEXT ) \ + { &TEXT[0], sizeof( TEXT ), 0, FALSE, 0, FALSE } /* Init and append to one of the above. */ diff --git a/libsrc/iofuncs/error.c b/libsrc/iofuncs/error.c index 3a670fd0..53a8e76d 100644 --- a/libsrc/iofuncs/error.c +++ b/libsrc/iofuncs/error.c @@ -70,8 +70,7 @@ */ #define IM_MAX_ERROR (10240) static char im_error_text[IM_MAX_ERROR] = ""; -static VipsBuf im_error_buf = - VIPS_BUF_STATIC( im_error_text, IM_MAX_ERROR ); +static VipsBuf im_error_buf = VIPS_BUF_STATIC( im_error_text ); #define IM_DIAGNOSTICS "IM_DIAGNOSTICS" #define IM_WARNING "IM_WARNING"