diff options
author | NIIBE Yutaka <[email protected]> | 2016-09-15 00:17:59 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2016-09-15 00:17:59 +0000 |
commit | 95f7320a37d3870330a2b1f3493025b4820fa767 (patch) | |
tree | a6644e624a41758e0bd620f7d56ea90f042b9adf /scheme-private.h | |
parent | gpgscm: Fix detection of unbalanced parenthesis. (diff) | |
download | libgpg-error-95f7320a37d3870330a2b1f3493025b4820fa767.tar.gz libgpg-error-95f7320a37d3870330a2b1f3493025b4820fa767.zip |
tests/gpgscm: Fix use of pointer.
* tests/gpgscm/scheme-private.h (struct scheme): Use (void *) for
alloc_seg.
* tests/gpgscm/scheme.c (alloc_cellseg): Use (void *) for cp. Use
(void *) for coercion of address calculation.
--
In old C language, (char *) means an address. In modern C, it's
specifically an address with alignment=1. It's good to use (void *) for
an address, because newer compiler emits warnings. Note: in this
particular case, it is just a warning and the code is safe against
invalid alignment, though.
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | scheme-private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scheme-private.h b/scheme-private.h index 9eafe76..727e0c0 100644 --- a/scheme-private.h +++ b/scheme-private.h @@ -78,7 +78,7 @@ int tracing; #ifndef CELL_NSEGMENT #define CELL_NSEGMENT 10 /* # of segments for cells */ #endif -char *alloc_seg[CELL_NSEGMENT]; +void *alloc_seg[CELL_NSEGMENT]; pointer cell_seg[CELL_NSEGMENT]; int last_cell_seg; |