[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cascaded casts
From: |
John Darrington |
Subject: |
Re: Cascaded casts |
Date: |
Sun, 30 Aug 2020 08:13:10 +0200 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Can you please redo this using the macros from glib:
GPOINTER_TO_INT and GINT_TO_POINTER
Use a temporary gint variable if it makes the code clearer.
Thanks.
commit d6510c8bb92e55331288bd7066e4697ca3cc9348
Author: Friedrich Beckmann <friedrich.beckmann@gmx.de>
Date: Sat Aug 29 18:29:06 2020 +0200
Warnings: correct cast for psppire-spread-sheet model
This fixes the compiler warning:
warning: wrong type argument to increment [-Wpointer-arith]
diff --git a/src/ui/gui/psppire-spreadsheet-model.c
b/src/ui/gui/psppire-spreadsheet-model.c
- iter->user_data++;
+ iter->user_data = (void *) ((intptr_t)(iter->user_data) + 1);