From fff5cd5e21f1696d6bc0885a5135e5ad791b4791 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 3 Feb 2004 18:33:03 -0800 Subject: [PATCH] [PATCH] gcc-3.5: binfmt_elf warning fix fs/binfmt_elf.c:171: warning: use of cast expressions as lvalues is deprecated --- fs/binfmt_elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index c535efa291013..be00c6c3d6501 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -123,7 +123,7 @@ static void padzero(unsigned long elf_bss) #define STACK_ADD(sp, items) ((elf_addr_t *)(sp) - (items)) #define STACK_ROUND(sp, items) \ (((unsigned long) (sp - items)) &~ 15UL) -#define STACK_ALLOC(sp, len) sp -= len +#define STACK_ALLOC(sp, len) ({ sp -= len ; sp; }) #endif static void @@ -168,7 +168,7 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr * exec, if (smp_num_siblings > 1) STACK_ALLOC(p, ((current->pid % 64) << 7)); #endif - u_platform = (elf_addr_t *) STACK_ALLOC(p, len); + u_platform = (elf_addr_t *)STACK_ALLOC(p, len); __copy_to_user(u_platform, k_platform, len); } -- 2.53.0