[prev in list] [next in list] [prev in thread] [next in thread]
List: bochs-dev
Subject: [Bochs-developers] [PATCH] fix unused variable warning in bx_init_main with BX_CPU_LEVEL <= 4
From: "Sebastian Herbszt" <herbszt () gmx ! de>
Date: 2013-09-05 21:00:10
Message-ID: E1F4080359724276ABB00DCFD523F962 () FSCPC
[Download RAW message or body]
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));
["bx_init_main-unused-var.diff" (application/octet-stream)]
--- 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
bochs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-developers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic