Project

General

Profile

Actions

Bug #3863

closed

reject: compile warning

Added by Victor Julien over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

respond-reject-libnet11.c: In function ‘RejectSendLibnet11IPv4TCP’:
respond-reject-libnet11.c:197:10: warning: ‘lpacket.src4’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if ((libnet_build_ipv4(
         ~^~~~~~~~~~~~~~~~~~  
                     lpacket->len,                 /* entire packet length */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0,                            /* tos */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     lpacket->id,                  /* ID */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0,                            /* fragmentation flags and offset */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     lpacket->ttl,                 /* TTL */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     proto,                        /* protocol */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0,                            /* checksum */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     lpacket->src4,                /* source address */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     lpacket->dst4,                /* destination address */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     NULL,                         /* pointer to packet data (or NULL) */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0,                            /* payload length */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     c,                            /* libnet context pointer */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0)) < 0)                      /* packet id */
                     ~~~
respond-reject-libnet11.c:282:20: note: ‘lpacket.src4’ was declared here
     Libnet11Packet lpacket;
                    ^~~~~~~
respond-reject-libnet11.c:197:10: warning: ‘lpacket.dst4’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if ((libnet_build_ipv4(
         ~^~~~~~~~~~~~~~~~~~
                     lpacket->len,                 /* entire packet length */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0,                            /* tos */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     lpacket->id,                  /* ID */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0,                            /* fragmentation flags and offset */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     lpacket->ttl,                 /* TTL */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     proto,                        /* protocol */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0,                            /* checksum */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     lpacket->src4,                /* source address */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     lpacket->dst4,                /* destination address */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     NULL,                         /* pointer to packet data (or NULL) */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0,                            /* payload length */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     c,                            /* libnet context pointer */
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     0)) < 0)                      /* packet id */
                     ~~~
respond-reject-libnet11.c:282:20: note: ‘lpacket.dst4’ was declared here
     Libnet11Packet lpacket;
                    ^~~~~~~
Actions #1

Updated by Victor Julien over 3 years ago

  • Status changed from New to Closed
  • Assignee changed from OISF Dev to Victor Julien
Actions

Also available in: Atom PDF