mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 23:05:17 +00:00
Suppress PVS Studio watning about reassigning a variable the same value.
Working around the warning would result in more fragile code.
This commit is contained in:
@@ -272,7 +272,7 @@ main(int argc, char *argv[])
|
|||||||
if (strcasecmp(conf->input_format, "ldif") == 0) {
|
if (strcasecmp(conf->input_format, "ldif") == 0) {
|
||||||
input_format = format_ldif;
|
input_format = format_ldif;
|
||||||
} else if (strcasecmp(conf->input_format, "sudoers") == 0) {
|
} else if (strcasecmp(conf->input_format, "sudoers") == 0) {
|
||||||
input_format = format_sudoers;
|
input_format = format_sudoers; // -V1048
|
||||||
} else {
|
} else {
|
||||||
sudo_warnx(U_("unsupported input format %s"), conf->input_format);
|
sudo_warnx(U_("unsupported input format %s"), conf->input_format);
|
||||||
usage();
|
usage();
|
||||||
@@ -286,7 +286,7 @@ main(int argc, char *argv[])
|
|||||||
output_format = format_json;
|
output_format = format_json;
|
||||||
conf->store_options = true;
|
conf->store_options = true;
|
||||||
} else if (strcasecmp(conf->output_format, "ldif") == 0) {
|
} else if (strcasecmp(conf->output_format, "ldif") == 0) {
|
||||||
output_format = format_ldif;
|
output_format = format_ldif; // -V1048
|
||||||
conf->store_options = true;
|
conf->store_options = true;
|
||||||
} else if (strcasecmp(conf->output_format, "sudoers") == 0) {
|
} else if (strcasecmp(conf->output_format, "sudoers") == 0) {
|
||||||
output_format = format_sudoers;
|
output_format = format_sudoers;
|
||||||
|
Reference in New Issue
Block a user