--- parser3/src/targets/cgi/parser3.C 2020/10/14 00:07:43 1.299 +++ parser3/src/targets/cgi/parser3.C 2020/10/14 00:14:45 1.302 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -volatile const char * IDENT_PARSER3_C="$Id: parser3.C,v 1.299 2020/10/14 00:07:43 moko Exp $"; +volatile const char * IDENT_PARSER3_C="$Id: parser3.C,v 1.302 2020/10/14 00:14:45 moko Exp $"; #include "pa_config_includes.h" @@ -105,7 +105,7 @@ static void log(const char* fmt, va_list fwrite(buf, size, 1, f); if(request_info.method) { - fprintf(f, " [uri=%s, method=%s, cl=%lu]\n", request_info.uri ? request_info.uri : "", request_info.method, request_info.content_length); + fprintf(f, " [uri=%s, method=%s, cl=%lu]\n", request_info.uri ? request_info.uri : "", request_info.method, (unsigned long)request_info.content_length); } else fputs(" [no request info]\n", f); @@ -143,7 +143,7 @@ void SAPI::die(const char* fmt, ...) { // inform user, second vsnprintf va_start(args, fmt); char message[MAX_STRING]; - int content_length=vsnprintf(message, MAX_STRING, fmt, args); + vsnprintf(message, MAX_STRING, fmt, args); SAPI::send_error(*sapiInfo, message); exit(1); @@ -536,7 +536,7 @@ int main(int argc, char *argv[]) { SAPI::die("Can not set handler for SIGPIPE"); #endif - char *raw_filespec_to_process; + char *raw_filespec_to_process = NULL; if(cgi) { raw_filespec_to_process=getenv("PATH_TRANSLATED"); if(raw_filespec_to_process && !*raw_filespec_to_process)