From: Ben Pfaff Date: Tue, 2 May 2006 22:44:55 +0000 (+0000) Subject: Declarations must precede statements for C90 compliance. X-Git-Tag: v0.6.0~911 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65c7da3a918fd720a0d7db73feebdb0442480e5b;p=pspp-builds.git Declarations must precede statements for C90 compliance. --- diff --git a/src/data/ChangeLog b/src/data/ChangeLog index 5369faa8..15675a92 100644 --- a/src/data/ChangeLog +++ b/src/data/ChangeLog @@ -1,3 +1,8 @@ +Tue May 2 15:43:36 2006 Ben Pfaff + + * variable.c (width_to_bytes): Declarations must precede + statements for C90 compliance. + Tue May 2 10:42:05 WST 2006 John Darrington * data-out.c, data-in.c, variable.c, variable.h: New functions diff --git a/src/data/variable.c b/src/data/variable.c index 56993e46..ee6c8747 100644 --- a/src/data/variable.c +++ b/src/data/variable.c @@ -432,6 +432,8 @@ copy_mangle (char *dst, size_t dst_size, int width_to_bytes(int width) { + const int chunks = width / EFFECTIVE_LONG_STRING_LENGTH ; + const int remainder = width - (chunks * EFFECTIVE_LONG_STRING_LENGTH) ; int bytes, mod8; assert (width >= 0); @@ -442,9 +444,6 @@ width_to_bytes(int width) if ( width <= MAX_LONG_STRING) return MAX_SHORT_STRING * DIV_RND_UP(width, MAX_SHORT_STRING); - const int chunks = width / EFFECTIVE_LONG_STRING_LENGTH ; - - const int remainder = width - (chunks * EFFECTIVE_LONG_STRING_LENGTH) ; bytes = remainder + (chunks * (MAX_LONG_STRING + 1) );