Skip to content

Commit 2ca6115

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 73536e6 commit 2ca6115

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
@@ -496,7 +496,7 @@ __extension__ \
496496
( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \
497497
((((h)->temp.tempint > 0 \
498498
&& (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \
499-
? (int) ((h)->next_free = (h)->object_base \
499+
? (ptrdiff_t) ((h)->next_free = (h)->object_base \
500500
= (h)->temp.tempint + (char *) (h)->chunk) \
501501
: (((obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
502502

0 commit comments

Comments
 (0)