Skip to contentSkip to conversation

cirrus: fix an uninitialized variable

PATCH In review Jan Beulich 2 participants 3 messages Feb 2, 2015 – Feb 16, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cirrus: fix an uninitialized variable

Noticed by paying attention to a compiler warning (reported for the only caller of the function modified, vga_ioport_read()).

hw/cirrus_vga.c +1 -1
@@ -1658,8 +1658,8 @@ cirrus_hook_read_cr(CirrusVGAState * s, 
     default:
 #ifdef DEBUG_CIRRUS
 	printf("cirrus: inport cr_index %02x\n", reg_index);
-	*reg_value = 0xff;
 #endif
+	*reg_value = 0xff;
 	break;
     }
 

cirrus: fix an uninitialized variable

Noticed by paying attention to a compiler warning (reported for the only caller of the function modified, vga_ioport_read()).

hw/cirrus_vga.c +1 -1
@@ -1658,8 +1658,8 @@ cirrus_hook_read_cr(CirrusVGAState * s, 
     default:
 #ifdef DEBUG_CIRRUS
 	printf("cirrus: inport cr_index %02x\n", reg_index);
-	*reg_value = 0xff;
 #endif
+	*reg_value = 0xff;
 	break;
     }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw

Ian Jackson writes ("Re: [PATCH qemu-trad] cirrus: fix an uninitialized variable"):

Quoted 3 lines

Jan Beulich writes ("[PATCH qemu-trad] cirrus: fix an uninitialized variable"):

Quoted 2 lines

Noticed by paying attention to a compiler warning (reported for the only caller of the function modified, vga_ioport_read()).

...

Quoted 1 line

Also, queued for backport.

Now pushed to 4.3, 4.5, 4.5.

Ian.