Opened 3 years ago

Closed 3 years ago

#2255 closed defect (fixed)

different declaration and impementation

Reported by: RekGRpth@… Owned by:
Priority: minor Milestone: nginx-1.21
Component: nginx-core Version: 1.19.x
Keywords: Cc:
uname -a: Linux nginx 5.11.0-37-generic #41-Ubuntu SMP Mon Sep 20 16:39:20 UTC 2021 x86_64 Linux
nginx -V: nginx version: nginx/1.21.4
built by gcc 10.3.1 20210424 (Alpine 10.3.1_git20210424)
built with OpenSSL 1.1.1l 24 Aug 2021
TLS SNI support enabled
configure arguments: --add-dynamic-module='modules/ngx_http_auth_basic_ldap_module modules/ngx_http_mustach_module modules/ngx_http_htmldoc_module modules/ngx_http_captcha_module modules/nginx-upload-module modules/ngx_postgres modules/ngx_brotli/static modules/ngx_brotli/filter modules/ngx_http_response_body_module modules/ngx_http_json_module modules/iconv-nginx-module modules/ngx_http_headers_module modules/ngx_http_handlebars_module modules/set-misc-nginx-module modules/ngx_http_auth_pam_module modules/nginx-push-stream-module modules/nginx-jwt-module modules/nginx-upstream-fair modules/ngx_http_evaluate_module modules/encrypted-session-nginx-module modules/ngx_http_sign_module modules/nginx-uuid4-module modules/ngx_http_upstream_session_sticky_module modules/echo-nginx-module modules/nginx_csrf_prevent modules/form-input-nginx-module modules/ngx_http_zip_var_module modules/ngx_http_substitutions_filter_module modules/njs/nginx modules/spnego-http-auth-nginx-module' --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --group=nginx --http-client-body-temp-path=/var/cache/nginx/client_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --lock-path=/run/nginx/nginx.lock --modules-path=/usr/local/lib/nginx --pid-path=/run/nginx/nginx.pid --prefix=/etc/nginx --sbin-path=/usr/local/bin/nginx --user=nginx --with-cc-opt='-W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -Wno-discarded-qualifiers -g -O' --with-compat --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-pcre --with-pcre-jit --with-poll_module --with-select_module --with-stream=dynamic --with-stream_geoip_module=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads

Description

cppcheck:

src/http/ngx_http_core_module.c:2376:41: warning: Function 'ngx_http_subrequest' argument order different: declaration 'r, uri, args, sr, psr, flags' definition 'r, uri, args, psr, ps, flags' [funcArgOrderDifferent]
ngx_http_subrequest(ngx_http_request_t *r,
                                        ^
src/http/ngx_http_core_module.h:508:51: note: Function 'ngx_http_subrequest' argument order different: declaration 'r, uri, args, sr, psr, flags' definition 'r, uri, args, psr, ps, flags'
ngx_int_t ngx_http_subrequest(ngx_http_request_t *r,
                                                  ^
src/http/ngx_http_core_module.c:2376:41: note: Function 'ngx_http_subrequest' argument order different: declaration 'r, uri, args, sr, psr, flags' definition 'r, uri, args, psr, ps, flags'
ngx_http_subrequest(ngx_http_request_t *r,
                                        ^

Change History (2)

comment:1 by Maxim Dounin <mdounin@…>, 3 years ago

In 7932:01829d162095/nginx:

Synced ngx_http_subrequest() argument names (ticket #2255).

comment:2 by Maxim Dounin, 3 years ago

Resolution: fixed
Status: newclosed

Synced argument names in the declaration to match names used in the definition, thanks for reporting this.

Note: See TracTickets for help on using tickets.