mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <gniibe@fsij.org>
This commit is contained in:
parent
9799b5d18f
commit
68eb5fbd37
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue