V766. An item with the same key has already been added.
V766 An item with the same key '"open"' has already been added. DialogButtons.hpp 69
class DialogButtons : public wxPanel
{
private:
const std::map<wxString, wxStandardID> m_standardIDs = {
// Choice
{"ok" , wxID_OK},
{"yes" , wxID_YES},
{"apply" , wxID_APPLY},
{"confirm" , wxID_APPLY}, // no id for confirm, reusing wxID_APPLY
{"no" , wxID_NO},
{"cancel" , wxID_CANCEL},
// Action
{"open" , wxID_PRINT}, // <=
{"open" , wxID_OPEN}, // <=
//....
}
V766 An item with the same key '"Abs"' has already been added. cpu_types.cpp 178
static const TypeToNameMap& get_type_to_name_tbl() {
static const TypeToNameMap type_to_name_tbl = {
....,
{"Abs", Type::Eltwise},
....,
{"SoftPlus", Type::Eltwise},
....,
{"Abs", Type::Math},
....,
{"SoftPlus", Type::Math},
....,
};
return type_to_name_tbl;
}
Similar errors can be found in some other places:
V766 An item with the same key ''.'' has already been added. wxCodeCompletionBoxManager.cpp:19
std::unordered_set<wxChar> delimiters =
{ ':', '@', '.', '!', ' ', '\t', '.', '\\',
'+', '*', '-', '<', '>', '[', ']', '(',
')', '{', '}', '=', '%', '#', '^', '&',
'\'', '"', '/', '|', ',', '~', ';', '`' };
Similar errors can be found in some other places:
V766 An item with the same key '0x120' has already been added. evdev_joystick_handler.h 135
class evdev_joystick_handler final : public PadHandlerBase
{
const std::unordered_map<u32, std::string> button_list =
{
// ....
{ 0x11d , "0x11d" },
{ 0x11e , "0x11e" },
{ 0x11f , "0x11f" },
{ BTN_JOYSTICK , "Joystick" }, // <=
{ BTN_TRIGGER , "Trigger" }, // <=
{ BTN_THUMB , "Thumb" },
{ BTN_THUMB2 , "Thumb 2" },
{ BTN_TOP , "Top" },
{ BTN_TOP2 , "Top 2" },
{ BTN_PINKIE , "Pinkie" },
// ....
}
}
At first glance at code, it is not clear which two keys are the same. It turns out that BTN_JOYSTICK and BTN_TRIGGER are Linux API constants that equals 0x120. (https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/input-event-codes.h#L365) BTN_JOYSTICK is the starting value of the joystick signal constant group and BTN_TRIGGER is the very first constant in the list of that group. Therefore, their values are the same.
V766 An item with the same key 'kArgRemote' has already been added. blast_args.cpp 3262
void
CBlastAppArgs::x_IssueWarningsForIgnoredOptions(const CArgs& args)
{
set<string> can_override;
....
can_override.insert(kArgOutputFormat);
can_override.insert(kArgNumDescriptions);
can_override.insert(kArgNumAlignments);
can_override.insert(kArgMaxTargetSequences);
can_override.insert(kArgRemote); // <=
can_override.insert(kArgNumThreads);
can_override.insert(kArgInputSearchStrategy);
can_override.insert(kArgRemote); // <=
can_override.insert("remote_verbose");
can_override.insert("verbose");
....
}
V766 CWE-462 An item with the same key '"oem_lpass_cfg"' has already been added. bootstat.cpp 264
const std::map<std::string, int32_t> kBootReasonMap = {
....
{"watchdog_sdi_apps_reset", 106},
{"smpl", 107},
{"oem_modem_failed_to_powerup", 108},
{"reboot_normal", 109},
{"oem_lpass_cfg", 110}, // <=
{"oem_xpu_ns_error", 111}, // <=
{"power_key_press", 112},
{"hardware_reset", 113},
{"reboot_by_powerkey", 114},
{"reboot_verity", 115},
{"oem_rpm_undef_error", 116},
{"oem_crash_on_the_lk", 117},
{"oem_rpm_reset", 118},
{"oem_lpass_cfg", 119}, // <=
{"oem_xpu_ns_error", 120}, // <=
{"factory_cable", 121},
{"oem_ar6320_failed_to_powerup", 122},
{"watchdog_rpm_bite", 123},
{"power_on_cable", 124},
{"reboot_unknown", 125},
....
};
Similar errors can be found in some other places:
V766 An item with the same key '"mrcs"' has already been added. importgtp-gp6.cpp 100
const static std::map<QString, QString> instrumentMapping = {
....
{"e-piano-gs", "electric-piano"},
{"e-piano-ss", "electric-piano"},
{"hrpch-gs", "harpsichord"},
{"hrpch-ss", "harpsichord"},
{"mrcs", "maracas"}, // <=
{"mrcs", "oboe"}, // <=
{"mrcs", "oboe"}, // <= using of Copy-Paste
....
};
V766 An item with the same key '"colorSectionBorder"' has already been added. ntp_resource_cache.cc 581
void NTPResourceCache::CreateNewTabCSS()
{
....
// Colors.
substitutions["colorBackground"] =
SkColorToRGBAString(color_background);
substitutions["backgroundBarDetached"] =
GetNewTabBackgroundCSS(tp, false);
substitutions["backgroundBarAttached"] =
GetNewTabBackgroundCSS(tp, true);
substitutions["backgroundTiling"] =
GetNewTabBackgroundTilingCSS(tp);
substitutions["colorTextRgba"] =
SkColorToRGBAString(color_text);
substitutions["colorSectionBorder"] =
SkColorToRGBAString(color_section_border); // <=
substitutions["colorTextLight"] =
SkColorToRGBAString(color_text_light);
substitutions["colorSectionBorder"] =
SkColorToRGBComponents(color_section_border); // <=
substitutions["colorText"] =
SkColorToRGBComponents(color_text);
....
}