Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
Examples of errors detected by the V766…

Examples of errors detected by the V766 diagnostic

V766. An item with the same key has already been added.


Chromium

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);
  ....
}

MuseScore

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
  ....
};

Android

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 CWE-462 An item with the same key '"oem_xpu_ns_error"' has already been added. bootstat.cpp 265

NCBI Genome Workbench

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");
  ....
}

RPCS3

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.


CodeLite

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 '"MSYS2/GCC"' has already been added. compiler.cpp:621, compiler.cpp:620

OpenVINO

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 '"SoftPlus"' has already been added. cpu_types.cpp 198

close form

Fill out the form in 2 simple steps below:

Your contact information:

Step 1
Congratulations! This is your promo code!

Desired license type:

Step 2
Team license
Enterprise license
** By clicking this button you agree to our Privacy Policy statement
close form
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
* By clicking this button you agree to our Privacy Policy statement

close form
Free PVS‑Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

close form
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

close form
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

close form
check circle
Message submitted.

Your message has been sent. We will email you at


If you do not see the email in your inbox, please check if it is filtered to one of the following folders:

  • Promotion
  • Updates
  • Spam