Commit ca7df67d authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Perform type conversion differently to get rid of type-punning.

parent 5d5ff612
......@@ -86,7 +86,7 @@ typedef struct {
}
zaxis_t;
static int zaxisCompareP ( void * zaxisptr1, void * zaxisptr2 );
static int zaxisCompareP(zaxis_t *z1, zaxis_t *z2);
static void zaxisDestroyP ( void * zaxisptr );
static void zaxisPrintP ( void * zaxisptr, FILE * fp );
static int zaxisGetPackSize ( void * zaxisptr, void *context);
......@@ -94,7 +94,7 @@ static void zaxisPack ( void * zaxisptr, void * buffer, int size, int *
static int zaxisTxCode ( void );
static const resOps zaxisOps = {
zaxisCompareP,
(int (*)(void *, void *))zaxisCompareP,
zaxisDestroyP,
zaxisPrintP,
zaxisGetPackSize,
......@@ -1528,10 +1528,8 @@ void zaxisPrintP ( void * voidptr, FILE * fp )
static int
zaxisCompareP ( void * zaxisptr1, void * zaxisptr2 )
zaxisCompareP(zaxis_t *z1, zaxis_t *z2)
{
zaxis_t * z1 = ( zaxis_t * ) zaxisptr1 ;
zaxis_t * z2 = ( zaxis_t * ) zaxisptr2 ;
enum {
differ = -1,
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment