Skip to content

Commit 9deb2e4

Browse files
committed
obstack: fix compiler warning
MS Visual C suggests that the construct condition ? (int) i : (ptrdiff_t) d is incorrect. Let's fix this by casting to ptrdiff_t also for the positive arm of the conditional. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 954e70d commit 9deb2e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/obstack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ __extension__ \
492492
( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \
493493
((((h)->temp.tempint > 0 \
494494
&& (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \
495-
? (int) ((h)->next_free = (h)->object_base \
495+
? (ptrdiff_t) ((h)->next_free = (h)->object_base \
496496
= (h)->temp.tempint + (char *) (h)->chunk) \
497497
: (((obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
498498

0 commit comments

Comments
 (0)