[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/7] vgabios: Does not define cur_mode if not required
Declare and use cur_mode only if debug is enabled Signed-off-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxxx> --- tools/firmware/vgabios/vbe.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/firmware/vgabios/vbe.c b/tools/firmware/vgabios/vbe.c index 3fc786d..3d42216 100644 --- a/tools/firmware/vgabios/vbe.c +++ b/tools/firmware/vgabios/vbe.c @@ -761,7 +761,9 @@ Bit16u *AX;Bit16u ES;Bit16u DI; Bit16u status; Bit16u result; Bit16u vbe2_info; +#ifdef DEBUG Bit16u cur_mode=0; +#endif Bit16u cur_ptr=34; ModeInfoListItem *cur_info=&mode_info_list; @@ -849,9 +851,9 @@ Bit16u *AX;Bit16u ES;Bit16u DI; (cur_info->info.XResolution * cur_info->info.XResolution * cur_info->info.BitsPerPixel <= vbe_info_block.TotalMemory << 19 )) { #ifdef DEBUG printf("VBE found mode %x => %x\n", cur_info->mode,cur_mode); + cur_mode++; #endif write_word(ES, DI + cur_ptr, cur_info->mode); - cur_mode++; cur_ptr+=2; } else { #ifdef DEBUG -- 1.7.5.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |