Skip to content

Compile warnings by LLVM 13 #8432

@masaori335

Description

@masaori335

Some warnings show up when I tried the llvm-13.0.0 against the latest master.

RecRawStats.cc:580:122: warning: performing pointer subtraction with a null pointer may have undefined behavior [-Wnull-pointer-subtraction]
                                                 (reinterpret_cast<char *>(&reinterpret_cast<RecRecord *>(0)->stat_meta) -
                                                                                                                         ^
1 warning generated.
Makefile:2601: warning: overriding recipe for target 'CompileParseRules'
Makefile:1191: warning: ignoring old recipe for target 'CompileParseRules'
Makefile:2601: warning: overriding recipe for target 'CompileParseRules'
Makefile:1191: warning: ignoring old recipe for target 'CompileParseRules'
In file included from MemArena.cc:27:
In file included from ../../include/tscore/MemArena.h:30:
../../include/tscpp/util/MemSpan.h:239:13: warning: definition of implicit copy assignment operator for 'MemSpan<void>' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
  constexpr MemSpan(self_type const &that) = default;
            ^
MemArena.cc:77:13: note: in implicit copy assignment operator for 'ts::MemSpan<void>' first required here
    zret    = _active->alloc(n);
            ^
1 warning generated.
UnixUDPNet.cc:966:7: warning: variable 'real_len' set but not used [-Wunused-but-set-variable]
  int real_len = 0;
      ^
1 warning generated.
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libinknet.a(BoringSSLUtils.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libinknet.a(SSLInternal.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libinknet.a(BoringSSLUtils.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libinknet.a(SSLInternal.o) has no symbols
In file included from HTTP.cc:30:
In file included from ./HTTP.h:29:
../../include/tscore/HTTPVersion.h:30:3: warning: definition of implicit copy assignment operator for 'HTTPVersion' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
  HTTPVersion(HTTPVersion const &that) = default;
  ^
HTTP.cc:286:21: note: in implicit copy assignment operator for 'HTTPVersion' first required here
  hh->m_version     = HTTP_1_0;
                    ^
1 warning generated.
In file included from HttpTransact.cc:30:
In file included from ./HttpTransact.h:28:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/hostdb/P_HostDB.h:35:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/dns/P_SplitDNS.h:33:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/dns/P_DNS.h:33:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/dns/I_DNS.h:34:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/hostdb/I_HostDB.h:37:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/hostdb/I_HostDBProcessor.h:31:
../../include/tscore/HTTPVersion.h:30:3: warning: definition of implicit copy assignment operator for 'HTTPVersion' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
  HTTPVersion(HTTPVersion const &that) = default;
  ^
HttpTransact.cc:1709:46: note: in implicit copy assignment operator for 'HTTPVersion' first required here
  s->server_info.http_version                = HTTP_1_0;
                                             ^
In file included from HttpSM.cc:25:
In file included from ./../ProxyTransaction.h:26:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/proxy/ProxySession.h:31:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/net/P_Net.h:100:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/net/P_UnixNet.h:141:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/dns/P_DNSConnection.h:34:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/dns/I_DNSProcessor.h:27:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/dns/SRV.h:28:
In file included from /opt/src/github.com/apache/trafficserver-asf-master/iocore/hostdb/I_HostDBProcessor.h:31:
../../include/tscore/HTTPVersion.h:30:3: warning: definition of implicit copy assignment operator for 'HTTPVersion' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
  HTTPVersion(HTTPVersion const &that) = default;
  ^
HttpSM.cc:4419:55: note: in implicit copy assignment operator for 'HTTPVersion' first required here
      t_state.host_db_info.app.http_data.http_version = t_state.updated_server_version;
                                                      ^
1 warning generated.
1 warning generated.
CoreAPIShared.cc:145:9: warning: variable 'requestPtr' set but not used [-Wunused-but-set-variable]
  char *requestPtr;
        ^
1 warning generated.
traffic_logcat/logcat.cc:122:12: warning: variable 'bytes' set but not used [-Wunused-but-set-variable]
  unsigned bytes = 0;
           ^
1 warning generated.
esi/lib/EsiGunzip.cc:81:13: warning: variable 'unzipped_data_size' set but not used [-Wunused-but-set-variable]
    int32_t unzipped_data_size = 0;
            ^
1 warning generated.
generator/generator.cc:541:13: warning: variable 'consumed' set but not used [-Wunused-but-set-variable]
    ssize_t consumed     = 0;
            ^
1 warning generated.
experimental/statichit/statichit.cc:369:13: warning: variable 'consumed' set but not used [-Wunused-but-set-variable]
    ssize_t consumed     = 0;
            ^
cachekey/.libs/common.o: no symbols
1 warning generated.
gold_tests/tls/ssl-post.c:164:7: warning: variable 'total_read' set but not used [-Wunused-but-set-variable]
  int total_read = 0;
      ^
1 warning generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildwork related to build configuration or environment

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions