]> git.ipfire.org Git - thirdparty/suricata.git/commit
dpdk: fix scan-build warnings
authorVictor Julien <vjulien@oisf.net>
Mon, 24 Apr 2023 19:39:45 +0000 (21:39 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 24 Apr 2023 19:39:48 +0000 (21:39 +0200)
commitea67a2edd28fa66403101a554d5bb7df9eae712c
tree962095dddefbaadc2b0b84e2492ebd4a9e5f7880
parente717c2e0ecdb797cb35920ae02682a7e78611652
dpdk: fix scan-build warnings

runmode-dpdk.c:204:18: warning: Result of 'calloc' is converted to a pointer of type 'char *', which is incompatible with sizeof operand type 'ptrdiff_t' [unix.MallocSizeof]
    args->argv = SCCalloc(capacity, sizeof(ptrdiff_t)); // alloc array of pointers
                 ^~~~~~~~           ~~~~~~~~~~~~~~~~~
./util-mem.h:36:18: note: expanded from macro 'SCCalloc'
 #define SCCalloc calloc
                  ^~~~~~
runmode-dpdk.c:278:16: warning: Result of 'malloc' is converted to a pointer of type 'char *', which is incompatible with sizeof operand type 'char **' [unix.MallocSizeof]
    eal_argv = SCMalloc(args.argc * sizeof(args.argv));
               ^~~~~~~~             ~~~~~~~~~~~~~~~~~
./util-mem.h:35:18: note: expanded from macro 'SCMalloc'
 #define SCMalloc malloc
                  ^~~~~~
2 warnings generated.
src/runmode-dpdk.c