[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Avoid pointer arithmetic on `void *'.
From: |
Ralf Wildenhues |
Subject: |
[PATCH] Avoid pointer arithmetic on `void *'. |
Date: |
Fri, 12 Jun 2009 12:20:14 +0200 |
User-agent: |
Mutt/1.5.19 (2009-06-09) |
* modules/m4.c (dump_symbol_CB): Cast obstack_base return value
to `char *' before using it.
Signed-off-by: Ralf Wildenhues <address@hidden>
---
Hi Eric,
found this while trying to build master on Tru64/OSF1, where the
compiler warns about void * arithmetic by default.
Cheers,
Ralf
modules/m4.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/m4.c b/modules/m4.c
index f3cfc94..1d0d7c4 100644
--- a/modules/m4.c
+++ b/modules/m4.c
@@ -279,7 +279,7 @@ dump_symbol_CB (m4_symbol_table *ignored M4_GNUC_UNUSED,
const char *name,
obstack_blank (symbol_data->obs, sizeof *symbol_data->base);
symbol_data->size = (obstack_room (symbol_data->obs)
/ sizeof *symbol_data->base);
- symbol_data->base = (m4_string *) (obstack_base (symbol_data->obs)
+ symbol_data->base = (m4_string *) ((char *) obstack_base
(symbol_data->obs)
+ offset);
}
else
--
1.6.3.2.199.g31f34
- [PATCH] Avoid pointer arithmetic on `void *'.,
Ralf Wildenhues <=