[PATCH] fix unused variable warning in bx_init_main with BX_CPU_LEVEL <= 4
"Sebastian Herbszt" <[email protected]> Thu, 5 Sep 2013 23:00:10 +0200
| Newsgroups | gmane.comp.emulators.bochs.devel |
|---|---|
| Message-ID | <E1F4080359724276ABB00DCFD523F962@FSCPC> |
Fix unused variable warning in bx_init_main with BX_CPU_LEVEL <= 4.
Sebastian
--- bochs-r11800/main.cc.orig 2013-09-05 18:55:59 +0000
+++ bochs-r11800/main.cc 2013-09-05 20:38:09 +0000
@@ -555,7 +555,7 @@
SIM->get_param_enum(BXPN_BOCHS_START)->set(BX_RUN_START);
// interpret the args that start with -, like -q, -f, etc.
- int arg = 1, load_rcfile=1, i = 0;
+ int arg = 1, load_rcfile=1;
while (arg < argc) {
// parse next arg
if (!strcmp("--help", argv[arg]) || !strncmp("-h", argv[arg], 2)
@@ -610,6 +610,7 @@
}
#if BX_CPU_LEVEL > 4
else if (!strcmp("cpu", argv[arg+1])) {
+ int i = 0;
fprintf(stderr, "Supported CPU models:\n\n");
do {
fprintf(stderr, "%s\n", SIM->get_param_enum(BXPN_CPU_MODEL)->get_choice(i));
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
bochs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bochs-developers
bx_init_main-unused-var.diff
(application/octet-stream, 725 B)
--- bochs-r11800/main.cc.orig 2013-09-05 18:55:59 +0000
+++ bochs-r11800/main.cc 2013-09-05 20:38:09 +0000
@@ -555,7 +555,7 @@
SIM->get_param_enum(BXPN_BOCHS_START)->set(BX_RUN_START);
// interpret the args that start with -, like -q, -f, etc.
- int arg = 1, load_rcfile=1, i = 0;
+ int arg = 1, load_rcfile=1;
while (arg < argc) {
// parse next arg
if (!strcmp("--help", argv[arg]) || !strncmp("-h", argv[arg], 2)
@@ -610,6 +610,7 @@
}
#if BX_CPU_LEVEL > 4
else if (!strcmp("cpu", argv[arg+1])) {
+ int i = 0;
fprintf(stderr, "Supported CPU models:\n\n");
do {
fprintf(stderr, "%s\n", SIM->get_param_enum(BXPN_CPU_MODEL)->get_choice(i));