Skip to content

Commit a8755ea

Browse files
committed
fix warning: variable 'str_n' set but not used
src/dmidecode.c: In function 'dmi_additional_info': src/dmidecode.c:4262:42: warning: variable 'str_n' set but not used [-Wunused-but-set-variable] 4262 | xmlNode *data_n = NULL, *str_n = NULL, *val_n = NULL; | ^~~~~
1 parent d52d234 commit a8755ea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/dmidecode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4259,7 +4259,7 @@ void dmi_additional_info(xmlNode *node, const struct dmi_header *h)
42594259
assert( node != NULL );
42604260

42614261
for(i = 0; i < count; i++) {
4262-
xmlNode *data_n = NULL, *str_n = NULL, *val_n = NULL;
4262+
xmlNode *data_n = NULL, *val_n = NULL;
42634263

42644264
/* Check for short entries */
42654265
if(h->length < offset + 1) {
@@ -4277,7 +4277,7 @@ void dmi_additional_info(xmlNode *node, const struct dmi_header *h)
42774277
dmixml_AddAttribute(data_n, "ReferenceHandle", "0x%04x", WORD(p + 0x01));
42784278
dmixml_AddAttribute(data_n, "ReferenceOffset", "0x%02x", p[0x03]);
42794279

4280-
str_n = dmixml_AddDMIstring(data_n, "String", h, p[0x04]);
4280+
dmixml_AddDMIstring(data_n, "String", h, p[0x04]);
42814281

42824282
switch (length - 0x05) {
42834283
case 1:

0 commit comments

Comments
 (0)