From 6bd7bb36b0b3ac745381bfd3a7b273c300b77b12 Mon Sep 17 00:00:00 2001 From: Martin Nilsson <nilsson@opera.com> Date: Wed, 28 May 2014 00:53:21 +0200 Subject: [PATCH] Unused defines. --- src/builtin_functions.c | 1 - src/encode.c | 17 ----------------- src/error.c | 4 ---- 3 files changed, 22 deletions(-) diff --git a/src/builtin_functions.c b/src/builtin_functions.c index da59a5a38f..f69d060cc1 100644 --- a/src/builtin_functions.c +++ b/src/builtin_functions.c @@ -4919,7 +4919,6 @@ PMOD_EXPORT void f_sleep(INT32 args) } #undef FIX_LEFT -#undef GET_TIME_ELAPSED #undef TIME_ELAPSED /*! @decl void delay(int|float s) diff --git a/src/encode.c b/src/encode.c index 99cb9b4c60..d61fee3468 100644 --- a/src/encode.c +++ b/src/encode.c @@ -225,16 +225,6 @@ static void encode_value2(struct svalue *val, struct encode_data *data, int forc } \ }while(0) -/* Like adddata, but allows null pointers */ - -#define adddata3(S) do { \ - if(S) { \ - adddata(S); \ - } else { \ - code_entry(TAG_INT, 0, data); \ - } \ -}while(0) - #define adddata2(s,l) addstr((char *)(s),(l) * sizeof((s)[0])); #ifdef ENCODE_DEBUG @@ -2095,13 +2085,6 @@ static DECLSPEC(noreturn) void decode_error ( (Y)=num; \ } while(0); -#define getdata2(S,L) do { \ - if(sizeof(S[0])*(L) > (size_t)(data->len - data->ptr)) \ - decode_error(data, NULL, "String range error.\n"); \ - MEMCPY((S),(data->data + data->ptr), sizeof(S[0])*(L)); \ - data->ptr+=sizeof(S[0])*(L); \ - }while(0) - #if PIKE_BYTEORDER == 4321 #define BITFLIP(S) #else diff --git a/src/error.c b/src/error.c index 3561107ca6..6bd8a39043 100644 --- a/src/error.c +++ b/src/error.c @@ -882,10 +882,6 @@ static void f_error_create(INT32 args) } while (0) -#define ERROR_COPY_REF(STRUCT,X) \ - add_ref( ERROR_STRUCT(STRUCT,o)->X=X ) - - /* This prepares the passed object o, which is assumed to inherit * generic_error_program, and throws it: * -- GitLab