Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netbsd compile warnings: "warning: array subscript has type ‘char’" #2551

Open
chipitsine opened this issue Apr 28, 2024 · 0 comments
Open
Labels
type: code-report This issue describes a code report (like valgrind or coverity)

Comments

@chipitsine
Copy link
Member

Tool Name and Version

gcc / netbsd-10

Code Report

2024-04-28T18:57:37.5436303Z   CC      src/ev_poll.o
2024-04-28T18:57:37.7209737Z   CC      src/ev_kqueue.o
2024-04-28T18:57:37.8784407Z   CC      src/ssl_sock.o
2024-04-28T18:57:38.1244330Z In file included from /usr/include/ctype.h:100,
2024-04-28T18:57:38.1245044Z                  from src/ssl_sock.c:28:
2024-04-28T18:57:38.1245998Z src/ssl_sock.c: In function ‘ssl_sock_switchctx_cbk’:
2024-04-28T18:57:38.1250722Z src/ssl_sock.c:2317:37: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2024-04-28T18:57:38.1251829Z  2317 |   trash.area[i] = tolower(servername[i]);
2024-04-28T18:57:38.1252450Z       |                                     ^
2024-04-28T18:57:39.6983489Z src/ssl_sock.c: At top level:
2024-04-28T18:57:39.6987445Z cc1: note: unrecognized command-line option ‘-Wno-atomic-alignment’ may have been intended to silence earlier diagnostics
2024-04-28T18:57:39.6991005Z cc1: note: unrecognized command-line option ‘-Wno-string-plus-int’ may have been intended to silence earlier diagnostics
2024-04-28T18:57:39.8741687Z   CC      src/ssl_ckch.o
2024-04-28T18:57:41.1221982Z   CC      src/ssl_sample.o
2024-04-28T18:57:41.8134230Z   CC      src/ssl_crtlist.o
2024-04-28T18:57:42.5098040Z   CC      src/cfgparse-ssl.o
2024-04-28T18:57:43.1711547Z   CC      src/ssl_utils.o
2024-04-28T18:57:43.4434957Z   CC      src/jwt.o
2024-04-28T18:57:43.6475277Z   CC      src/ssl_ocsp.o
2024-04-28T18:57:44.3845545Z   CC      src/ssl_gencert.o
2024-04-28T18:57:44.7418381Z   CC      src/hlua.o
2024-04-28T18:57:48.6769782Z   CC      src/hlua_fcn.o
2024-04-28T18:57:49.4109105Z   CC      addons/promex/service-prometheus.o
2024-04-28T18:57:50.4561107Z   CC      src/mux_h2.o
2024-04-28T18:57:54.2809749Z   CC      src/mux_fcgi.o
2024-04-28T18:57:56.7487360Z   CC      src/mux_h1.o
2024-04-28T18:57:59.3720938Z   CC      src/tcpcheck.o
2024-04-28T18:58:01.2951344Z   CC      src/stream.o
2024-04-28T18:58:03.2648269Z   CC      src/stats.o
2024-04-28T18:58:04.3088929Z   CC      src/http_ana.o
2024-04-28T18:58:06.0486942Z   CC      src/server.o
2024-04-28T18:58:08.0737104Z   CC      src/stick_table.o
2024-04-28T18:58:09.9336532Z   CC      src/sample.o
2024-04-28T18:58:11.4743195Z   CC      src/flt_spoe.o
2024-04-28T18:58:12.9600457Z   CC      src/tools.o
2024-04-28T18:58:13.2300272Z In file included from /usr/include/ctype.h:100,
2024-04-28T18:58:13.2300961Z                  from src/tools.c:35:
2024-04-28T18:58:13.2301986Z src/tools.c: In function ‘update_word_fingerprint’:
2024-04-28T18:58:13.2313141Z src/tools.c:6253:15: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2024-04-28T18:58:13.2314014Z  6253 |   c = tolower(*p);
2024-04-28T18:58:13.2314291Z       |               ^
2024-04-28T18:58:14.6284735Z src/tools.c: At top level:
2024-04-28T18:58:14.6288841Z cc1: note: unrecognized command-line option ‘-Wno-atomic-alignment’ may have been intended to silence earlier diagnostics
2024-04-28T18:58:14.6293172Z cc1: note: unrecognized command-line option ‘-Wno-string-plus-int’ may have been intended to silence earlier diagnostics
2024-04-28T18:58:14.7682382Z   CC      src/log.o
2024-04-28T18:58:16.7951559Z   CC      src/cfgparse.o
2024-04-28T18:58:18.2152257Z   CC      src/peers.o
2024-04-28T18:58:19.6006237Z   CC      src/backend.o
2024-04-28T18:58:20.6706473Z   CC      src/resolvers.o
2024-04-28T18:58:20.8336855Z In file included from /usr/include/ctype.h:100,
2024-04-28T18:58:20.8337411Z                  from include/import/ist.h:32,
2024-04-28T18:58:20.8338299Z                  from include/haproxy/http-t.h:27,
2024-04-28T18:58:20.8340114Z                  from include/haproxy/sample_data-t.h:29,
2024-04-28T18:58:20.8340887Z                  from include/haproxy/vars-t.h:25,
2024-04-28T18:58:20.8341578Z                  from include/haproxy/action-t.h:27,
2024-04-28T18:58:20.8341984Z                  from include/haproxy/action.h:26,
2024-04-28T18:58:20.8342370Z                  from src/resolvers.c:23:
2024-04-28T18:58:20.8342892Z src/resolvers.c: In function ‘resolv_check_response’:
2024-04-28T18:58:20.8343617Z src/resolvers.c:839:43: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2024-04-28T18:58:20.8344327Z   839 |      target[i] = tolower(item->data.target[i]);
2024-04-28T18:58:20.8344732Z       |                                           ^
2024-04-28T18:58:20.8435135Z src/resolvers.c: In function ‘resolv_dn_label_to_str’:
2024-04-28T18:58:20.8440384Z src/resolvers.c:1813:25: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2024-04-28T18:58:20.8441062Z  1813 |    *(ptr++) = tolower(dn[++i]);
2024-04-28T18:58:20.8441407Z       |                         ^
2024-04-28T18:58:20.8447198Z src/resolvers.c: In function ‘resolv_str_to_dn_label’:
2024-04-28T18:58:20.8452564Z src/resolvers.c:1853:24: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2024-04-28T18:58:20.8453218Z  1853 |   dn[i+1] = tolower(str[i]);
2024-04-28T18:58:20.8453547Z       |                        ^
2024-04-28T18:58:21.7983438Z src/resolvers.c: At top level:
2024-04-28T18:58:21.7987170Z cc1: note: unrecognized command-line option ‘-Wno-atomic-alignment’ may have been intended to silence earlier diagnostics
2024-04-28T18:58:21.7991024Z cc1: note: unrecognized command-line option ‘-Wno-string-plus-int’ may have been intended to silence earlier diagnostics
2024-04-28T18:58:21.8956656Z   CC      src/cli.o
2024-04-28T18:58:23.1607913Z   CC      src/connection.o
2024-04-28T18:58:24.3839949Z   CC      src/proxy.o
2024-04-28T18:58:25.4039855Z   CC      src/http_htx.o
2024-04-28T18:58:26.4938056Z   CC      src/cfgparse-listen.o
2024-04-28T18:58:27.3842032Z   CC      src/pattern.o
2024-04-28T18:58:28.2923863Z   CC      src/check.o
2024-04-28T18:58:29.2566897Z   CC      src/haproxy.o
2024-04-28T18:58:30.2366331Z   CC      src/cache.o
2024-04-28T18:58:31.3705441Z   CC      src/stconn.o
2024-04-28T18:58:32.3638090Z   CC      src/http_act.o
2024-04-28T18:58:33.1755142Z   CC      src/http_fetch.o
2024-04-28T18:58:33.9869085Z   CC      src/http_client.o
2024-04-28T18:58:34.8934676Z   CC      src/listener.o
2024-04-28T18:58:35.7804059Z   CC      src/dns.o
2024-04-28T18:58:36.5216624Z   CC      src/vars.o
2024-04-28T18:58:37.1753224Z   CC      src/debug.o
2024-04-28T18:58:37.9189175Z   CC      src/tcp_rules.o
2024-04-28T18:58:38.5373045Z   CC      src/sink.o
2024-04-28T18:58:39.0610370Z   CC      src/h1_htx.o
2024-04-28T18:58:39.5245187Z   CC      src/task.o
2024-04-28T18:58:39.9682376Z   CC      src/mjson.o
2024-04-28T18:58:40.3923059Z   CC      src/h2.o
2024-04-28T18:58:40.8092545Z   CC      src/filters.o
2024-04-28T18:58:41.2258628Z   CC      src/server_state.o
2024-04-28T18:58:41.3781133Z In file included from /usr/include/ctype.h:100,
2024-04-28T18:58:41.3782150Z                  from include/import/ist.h:32,
2024-04-28T18:58:41.3787850Z                  from include/haproxy/check-t.h:21,
2024-04-28T18:58:41.3788675Z                  from include/haproxy/server-t.h:31,
2024-04-28T18:58:41.3789439Z                  from include/haproxy/lb_map-t.h:26,
2024-04-28T18:58:41.3790207Z                  from include/haproxy/backend-t.h:30,
2024-04-28T18:58:41.3790868Z                  from include/haproxy/backend.h:26,
2024-04-28T18:58:41.3791914Z                  from src/server_state.c:19:
2024-04-28T18:58:41.3792755Z src/server_state.c: In function ‘srv_state_srv_update’:
2024-04-28T18:58:41.3793915Z src/server_state.c:425:24: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2024-04-28T18:58:41.3794863Z   425 |    tmp[i] = tolower(tmp[i]);
2024-04-28T18:58:41.3795382Z       |                        ^
2024-04-28T18:58:41.6822610Z src/server_state.c: At top level:
2024-04-28T18:58:41.6825703Z cc1: note: unrecognized command-line option ‘-Wno-atomic-alignment’ may have been intended to silence earlier diagnostics
2024-04-28T18:58:41.6829290Z cc1: note: unrecognized command-line option ‘-Wno-string-plus-int’ may have been intended to silence earlier diagnostics
2024-04-28T18:58:41.7312687Z   CC      src/payload.o
2024-04-28T18:58:42.1993266Z   CC      src/fcgi-app.o
2024-04-28T18:58:42.6842360Z   CC      src/map.o
2024-04-28T18:58:43.1739055Z   CC      src/htx.o
2024-04-28T18:58:43.6024419Z   CC      src/h1.o
2024-04-28T18:58:44.0541134Z   CC      src/pool.o
2024-04-28T18:58:44.6381951Z   CC      src/dns_ring.o
2024-04-28T18:58:44.9362874Z   CC      src/cfgparse-global.o
2024-04-28T18:58:45.3523835Z   CC      src/trace.o
2024-04-28T18:58:45.7992002Z   CC      src/tcp_sample.o
2024-04-28T18:58:46.2530901Z   CC      src/http_ext.o
2024-04-28T18:58:47.0030477Z   CC      src/flt_http_comp.o
2024-04-28T18:58:47.4823315Z   CC      src/mux_pt.o
2024-04-28T18:58:47.9770304Z   CC      src/flt_trace.o
2024-04-28T18:58:48.3858125Z   CC      src/mqtt.o
2024-04-28T18:58:48.7348174Z   CC      src/acl.o
2024-04-28T18:58:49.1280802Z   CC      src/sock.o
2024-04-28T18:58:49.5332844Z   CC      src/mworker.o
2024-04-28T18:58:49.9707258Z   CC      src/tcp_act.o
2024-04-28T18:58:50.3983319Z   CC      src/ring.o
2024-04-28T18:58:50.8238934Z   CC      src/session.o
2024-04-28T18:58:51.2737166Z   CC      src/proto_tcp.o
2024-04-28T18:58:51.6050300Z   CC      src/fd.o
2024-04-28T18:58:52.0258984Z   CC      src/channel.o
2024-04-28T18:58:52.3959674Z   CC      src/activity.o
2024-04-28T18:58:53.1598649Z   CC      src/queue.o
2024-04-28T18:58:53.4991443Z   CC      src/lb_fas.o
2024-04-28T18:58:53.6837695Z   CC      src/http_rules.o
2024-04-28T18:58:54.0349922Z   CC      src/extcheck.o
2024-04-28T18:58:54.3338077Z   CC      src/flt_bwlim.o
2024-04-28T18:58:54.7172785Z   CC      src/thread.o
2024-04-28T18:58:55.0949115Z   CC      src/http.o
2024-04-28T18:58:55.4517545Z   CC      src/lb_chash.o
2024-04-28T18:58:55.7782997Z   CC      src/applet.o
2024-04-28T18:58:56.5741789Z   CC      src/compression.o
2024-04-28T18:58:56.8528441Z   CC      src/raw_sock.o
2024-04-28T18:58:57.0535251Z   CC      src/ncbuf.o
2024-04-28T18:58:57.3203338Z   CC      src/frontend.o
2024-04-28T18:58:57.5970978Z   CC      src/errors.o
2024-04-28T18:58:57.9033451Z   CC      src/uri_normalizer.o
2024-04-28T18:58:57.9607507Z In file included from /usr/include/ctype.h:100,
2024-04-28T18:58:57.9608534Z                  from include/import/ist.h:32,
2024-04-28T18:58:57.9609255Z                  from src/uri_normalizer.c:13:
2024-04-28T18:58:57.9610607Z src/uri_normalizer.c: In function ‘uri_normalizer_percent_upper’:
2024-04-28T18:58:57.9612109Z src/uri_normalizer.c:180:43: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2024-04-28T18:58:57.9613329Z   180 |      output = __istappend(output, toupper(istshift(&scanner)));
2024-04-28T18:58:57.9614164Z       |                                           ^
2024-04-28T18:58:57.9615406Z src/uri_normalizer.c:181:43: warning: array subscript has type ‘char’ [-Wchar-subscripts]
2024-04-28T18:58:57.9616754Z   181 |      output = __istappend(output, toupper(istshift(&scanner)));
2024-04-28T18:58:57.9617605Z       |                                           ^
2024-04-28T18:58:58.0905599Z src/uri_normalizer.c: At top level:
2024-04-28T18:58:58.0909045Z cc1: note: unrecognized command-line option ‘-Wno-atomic-alignment’ may have been intended to silence earlier diagnostics
2024-04-28T18:58:58.0913259Z cc1: note: unrecognized command-line option ‘-Wno-string-plus-int’ may have been intended to silence earlier diagnostics

Additional Information

No response

Output of haproxy -vv

no
@chipitsine chipitsine added the type: code-report This issue describes a code report (like valgrind or coverity) label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: code-report This issue describes a code report (like valgrind or coverity)
Projects
None yet
Development

No branches or pull requests

1 participant