Project

General

Profile

Actions

Bug #3145

closed

scan-build warning for af-packet

Added by Victor Julien over 4 years ago. Updated 12 months ago.

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

Description

  CC       source-af-packet.o
source-af-packet.c:1961:24: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'union thdr *'
        ptv->ring.v2 = SCMalloc(ptv->req.v2.tp_frame_nr * sizeof (union thdr *));
                       ^~~~~~~~                           ~~~~~~~~~~~~~~~~~~~~~
./util-mem.h:37:18: note: expanded from macro 'SCMalloc'
#define SCMalloc malloc
                 ^~~~~~
1 warning generated.

Related issues 1 (1 open0 closed)

Related to Suricata - Task #3153: tracking: scan-build warningsIn ProgressVictor JulienActions
Actions #1

Updated by Victor Julien over 4 years ago

  • Related to Task #3153: tracking: scan-build warnings added
Actions #2

Updated by Victor Julien 12 months ago

  • Status changed from New to Closed
  • Assignee changed from OISF Dev to Victor Julien
  • Target version deleted (TBD)
Actions

Also available in: Atom PDF