mirror of https://github.com/OISF/suricata
enip: fix compile warnings in gcc-8
In file included from suricata-common.h:471, from app-layer-enip-common.c:27: app-layer-enip-common.c: In function ‘DecodeCIPRequestPathPDU’: util-debug.h:222:31: warning: ‘req_path_class8’ may be used uninitialized in this function [-Wmaybe-uninitialized] int _sc_log_ret = snprintf(_sc_log_msg, SC_LOG_MAX_LOG_MSG_LEN, __VA_ARGS__); \ ^~~~~~~~ app-layer-enip-common.c:589:13: note: ‘req_path_class8’ was declared here uint8_t req_path_class8; ^~~~~~~~~~~~~~~ app-layer-enip-common.c:607:9: warning: ‘segment’ may be used uninitialized in this function [-Wmaybe-uninitialized] switch (segment) ^~~~~~ app-layer-enip-common.c: In function ‘DecodeCIPResponsePDU’: app-layer-enip-common.c:773:13: warning: ‘service’ may be used uninitialized in this function [-Wmaybe-uninitialized] service &= 0x7f; //strip off top bit to get service code. Responses have first bit as 1 ^~ app-layer-enip-common.c: In function ‘DecodeCIPRequestPDU’: app-layer-enip-common.c:503:25: warning: ‘path_size’ may be used uninitialized in this function [-Wmaybe-uninitialized] offset += path_size * sizeof(uint16_t); //move offset past pathsize ~~~~~~~~~~^~~~~~~~~~~~~~~~~~ app-layer-enip-common.c:506:5: warning: ‘service’ may be used uninitialized in this function [-Wmaybe-uninitialized] switch (service) ^~~~~~ Bug #3139.pull/4252/head
parent
c769909dad
commit
9340769ad2
Loading…
Reference in New Issue