Project

General

Profile

Actions

Bug #3148

open

scan-build warnings for ac implementations

Added by Victor Julien about 3 years ago.

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

Description

  CC       util-mpm-ac-bs.o
util-mpm-ac-bs.c:487:32: warning: Result of 'malloc' is converted to a pointer of type 'uint16_t [256]', which is incompatible with sizeof operand type 'uint16_t'
        ctx->state_table_u16 = SCMalloc(ctx->state_count *
                               ^~~~~~~~
./util-mem.h:37:18: note: expanded from macro 'SCMalloc'
#define SCMalloc malloc
                 ^~~~~~
util-mpm-ac-bs.c:528:32: warning: Result of 'malloc' is converted to a pointer of type 'uint32_t [256]', which is incompatible with sizeof operand type 'uint32_t'
        ctx->state_table_u32 = SCMalloc(ctx->state_count *
                               ^~~~~~~~
./util-mem.h:37:18: note: expanded from macro 'SCMalloc'
#define SCMalloc malloc
                 ^~~~~~
2 warnings generated.
  CC       util-mpm-ac.o
util-mpm-ac.c:571:32: warning: Result of 'malloc' is converted to a pointer of type 'uint16_t [256]', which is incompatible with sizeof operand type 'uint16_t'
        ctx->state_table_u16 = SCMalloc(ctx->state_count *
                               ^~~~~~~~
./util-mem.h:37:18: note: expanded from macro 'SCMalloc'
#define SCMalloc malloc
                 ^~~~~~
util-mpm-ac.c:614:32: warning: Result of 'malloc' is converted to a pointer of type 'uint32_t [256]', which is incompatible with sizeof operand type 'uint32_t'
        ctx->state_table_u32 = SCMalloc(ctx->state_count *
                               ^~~~~~~~
./util-mem.h:37:18: note: expanded from macro 'SCMalloc'
#define SCMalloc malloc
                 ^~~~~~
2 warnings generated.

Related issues 1 (1 open0 closed)

Related to Task #3153: tracking: scan-build warningsNewOISF DevActions
Actions #1

Updated by Victor Julien about 3 years ago

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

Also available in: Atom PDF