From: Bruno Haible Date: Sun, 11 Mar 2007 22:34:33 +0000 (+0000) Subject: Make pointer decrementing code ANSI C compliant. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c091b642ef5dfebb141d72e1289d5f20d5387b5;p=pspp Make pointer decrementing code ANSI C compliant. --- diff --git a/ChangeLog b/ChangeLog index 6352e0ed4a..85d4d68570 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-11 Bruno Haible + + * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer + decrementing code ANSI C compliant. + 2007-03-11 Bruno Haible * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef. diff --git a/lib/gl_array_oset.c b/lib/gl_array_oset.c index b7e2be021e..f7950b7a62 100644 --- a/lib/gl_array_oset.c +++ b/lib/gl_array_oset.c @@ -1,5 +1,5 @@ /* Ordered set data type implemented by an array. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006-2007 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software; you can redistribute it and/or modify @@ -297,8 +297,8 @@ gl_array_iterator_next (gl_oset_iterator_t *iterator, const void **eltp) abort (); /* The last returned element was removed. */ iterator->count--; - iterator->p--; - iterator->q--; + iterator->p = (const void **) iterator->p - 1; + iterator->q = (const void **) iterator->q - 1; } if (iterator->p < iterator->q) {