Fix gcc12 format.c -Wmaybe-uninitialized warnings (#3008)

This commit is contained in:
Khairul Azhar Kasmiran 2022-09-06 20:54:04 +08:00 committed by GitHub
parent ade374378e
commit 06000072af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -582,7 +582,7 @@ static void rz_type_format_time(RzStrBuf *outbuf, int endian, int mode,
// TODO: support unsigned int?
static void rz_type_format_hex(RzStrBuf *outbuf, int endian, int mode,
const char *setval, ut64 seeki, ut8 *buf, int i, int size) {
ut64 addr;
ut64 addr = 0;
int elem = -1;
if (size >= ARRAYINDEX_COEF) {
elem = size / ARRAYINDEX_COEF - 1;
@ -752,7 +752,7 @@ static int rz_type_format_disasm(const RzPrint *p, ut64 seeki, int size) {
static void rz_type_format_octal(RzStrBuf *outbuf, int endian, int mode,
const char *setval, ut64 seeki, ut8 *buf, int i, int size) {
ut64 addr;
ut64 addr = 0;
int elem = -1;
if (size >= ARRAYINDEX_COEF) {
elem = size / ARRAYINDEX_COEF - 1;