From 49e2d4654d90139631e035f0e7df1dfe7c4d5987 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Sun, 18 Feb 2024 10:46:10 -0500 Subject: [PATCH] 'add_off.c' declared a variable inside a for() statement. This fails with gcc-4.8 (an elderly, but still used, compiler). --- add_off.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/add_off.c b/add_off.c index 8b98ebc..410f61b 100644 --- a/add_off.c +++ b/add_off.c @@ -483,7 +483,7 @@ int main( void) extern char **environ; int cgi_status; const char *temp_filename = "/tmp/add_off.txt"; - size_t bytes_written = 0; + size_t i, bytes_written = 0; avoid_runaway_process( 15); printf( "Content-type: text/html\n\n"); @@ -496,7 +496,7 @@ int main( void) } setbuf( lock_file, NULL); fprintf( lock_file, "'add_off' : We're in\n"); - for( size_t i = 0; environ[i]; i++) + for( i = 0; environ[i]; i++) fprintf( lock_file, "%s\n", environ[i]); cgi_status = initialize_cgi_reading( ); fprintf( lock_file, "CGI status %d\n", cgi_status);