Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeralChild64 <unknown>2022-10-14 13:56:11 +0300
committerkcgen <1557255+kcgen@users.noreply.github.com>2022-10-22 21:15:34 +0300
commit28a8a91cf72dc8d76ce6a812030a08f761f0f7f1 (patch)
tree25dba1f1f1ff88fd62bda7aacf7347dfc4ca998f
parentffc06cae7a0665c08f363c4cb2c6a364fdccd640 (diff)
Fix static analysis remarks
-rw-r--r--.pvs-suppress24
-rw-r--r--src/dos/program_mousectl.cpp2
-rw-r--r--src/hardware/mouse/mouse_config.cpp5
3 files changed, 15 insertions, 16 deletions
diff --git a/.pvs-suppress b/.pvs-suppress
index 86d5d6c0f..5fe46ee80 100644
--- a/.pvs-suppress
+++ b/.pvs-suppress
@@ -266,12 +266,12 @@
"Message": "Expression is always false."
},
{
- "CodeCurrent": 2720321149,
+ "CodeCurrent": 737424757,
"CodeNext": 123,
- "CodePrev": 250668972,
+ "CodePrev": 0,
"ErrorCode": "V801",
- "FileName": "mouseif_dos_driver.cpp",
- "Message": "Decreased performance. It is better to redefine the second function argument as a reference. Consider replacing 'const .. buttons__S' with 'const .. &buttons__S'."
+ "FileName": "mouseif_virtual_machines.cpp",
+ "Message": "Decreased performance. It is better to redefine the first function argument as a reference. Consider replacing 'const .. buttons__S' with 'const .. &buttons__S'."
},
{
"CodeCurrent": 3135489084,
@@ -282,6 +282,14 @@
"Message": "Decreased performance. It is better to redefine the first function argument as a reference. Consider replacing 'const .. new_buttons__S' with 'const .. &new_buttons__S'."
},
{
+ "CodeCurrent": 2899585489,
+ "CodeNext": 123,
+ "CodePrev": 0,
+ "ErrorCode": "V801",
+ "FileName": "mouseif_dos_driver.cpp",
+ "Message": "Decreased performance. It is better to redefine the second function argument as a reference. Consider replacing 'const .. buttons__S' with 'const .. &buttons__S'."
+ },
+ {
"CodeCurrent": 3190791416,
"CodeNext": 588197875,
"CodePrev": 0,
@@ -296,14 +304,6 @@
"ErrorCode": "V801",
"FileName": "mouseif_ps2_bios.cpp",
"Message": "Decreased performance. It is better to redefine the second function argument as a reference. Consider replacing 'const .. new_buttons_all' with 'const .. &new_buttons_all'."
- },
- {
- "CodeCurrent": 737424757,
- "CodeNext": 123,
- "CodePrev": 0,
- "ErrorCode": "V801",
- "FileName": "mouseif_virtual_machines.cpp",
- "Message": "Decreased performance. It is better to redefine the first function argument as a reference. Consider replacing 'const .. buttons__S' with 'const .. &buttons__S'."
}
]
}
diff --git a/src/dos/program_mousectl.cpp b/src/dos/program_mousectl.cpp
index 705037a71..656b27c4c 100644
--- a/src/dos/program_mousectl.cpp
+++ b/src/dos/program_mousectl.cpp
@@ -56,7 +56,7 @@ bool MOUSECTL::ParseAndRun()
{
if (idx >= params.size())
return false;
- return iequals(params[idx].c_str(), string);
+ return iequals(params[idx], string);
};
// CmdShow
diff --git a/src/hardware/mouse/mouse_config.cpp b/src/hardware/mouse/mouse_config.cpp
index 6f147beee..ce6dbe1a1 100644
--- a/src/hardware/mouse/mouse_config.cpp
+++ b/src/hardware/mouse/mouse_config.cpp
@@ -262,7 +262,6 @@ static void config_init(Section_prop &secprop)
constexpr auto only_at_start = Property::Changeable::OnlyAtStart;
Prop_bool *prop_bool = nullptr;
- // XXX Prop_int *prop_int = nullptr;
Prop_string *prop_str = nullptr;
PropMultiVal *prop_multi = nullptr;
@@ -278,8 +277,8 @@ static void config_init(Section_prop &secprop)
"Setting can be adjusted in runtime (also per mouse interface) using internal\n"
"MOUSECTL.COM tool, available on drive Z:.");
prop_multi->SetValue("1.0");
- prop_str = prop_multi->GetSection()->Add_string("xsens", only_at_start, "1.0");
- prop_str = prop_multi->GetSection()->Add_string("ysens", only_at_start, "1.0");
+ prop_multi->GetSection()->Add_string("xsens", only_at_start, "1.0");
+ prop_multi->GetSection()->Add_string("ysens", only_at_start, "1.0");
prop_bool = secprop.Add_bool("mouse_raw_input", always, true);
prop_bool->Set_help(