metrica
Мы используем куки, чтобы пользоваться сайтом было удобно.
Хорошо
to the top
close form

Заполните форму в два простых шага ниже:

Ваши контактные данные:

Шаг 1
Поздравляем! У вас есть промокод!

Тип желаемой лицензии:

Шаг 2
Team license
Enterprise license
** Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности
close form
Запросите информацию о ценах
Новая лицензия
Продление лицензии
--Выберите валюту--
USD
EUR
RUB
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
Бесплатная лицензия PVS‑Studio для специалистов Microsoft MVP
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
Для получения лицензии для вашего открытого
проекта заполните, пожалуйста, эту форму
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
Мне интересно попробовать плагин на:
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
check circle
Ваше сообщение отправлено.

Мы ответим вам на


Если вы так и не получили ответ, пожалуйста, проверьте папку
Spam/Junk и нажмите на письме кнопку "Не спам".
Так Вы не пропустите ответы от нашей команды.

Вебинар: Трудности при интеграции SAST, как с ними справляться - 04.04

>
>
>
Примеры ошибок, обнаруженных с помощью …

Примеры ошибок, обнаруженных с помощью диагностики V3128

V3128. The field (property) is used before it is initialized in constructor.


SharpDevelop

V3128 The 'contentPanel' field is used before it is initialized in constructor. SearchResultsPad.cs 66


Grid contentPanel;
public SearchResultsPad()
{
  ....
  defaultToolbarItems = ToolBarService
    .CreateToolBarItems(contentPanel, ....);
  ....
  contentPanel = new Grid {....};
  ....
}

PascalABC.NET

V3128 The 'dockPanel' field is used before it is initialized in constructor. ICSharpCode.SharpDevelop SearchResultsPad.cs 49


....
DockPanel dockPanel;
....
public SearchResultsPad()
{
  ....
  defaultToolbarItems = ToolBarService.
    CreateToolBarItems(dockPanel, ....);  // <=
  foreach (object toolBarItem in defaultToolbarItems) {
    toolBar.Items.Add(toolBarItem);
  }
  ....
  dockPanel = new DockPanel {
    Children = { toolBar, contentPlaceholder }
  };
  ....
}

.NET Core Libraries (CoreFX)

V3128 The '_index' field is used before it is initialized in constructor. PrinterSettings.Windows.cs 1679


private class ArrayEnumerator : IEnumerator
{
  private object[] _array;
  private object _item;
  private int _index;
  private int _startIndex;
  private int _endIndex;
  public ArrayEnumerator(object[] array, int startIndex, int count)
  {
    _array = array;
    _startIndex = startIndex;
    _endIndex = _index + count; // <=

    _index = _startIndex;
  }
  ....
}

.NET Core Libraries (CoreFX)

V3128 The '_timerInterval' field is used before it is initialized in constructor. TransactionTable.cs 151


internal class TransactionTable
{
  ....
  private int _timerInterval;
  ....
  internal TransactionTable()
  {
    _timer = new Timer(new TimerCallback(ThreadTimer),
                       null,
                       Timeout.Infinite,
                       _timerInterval); // <=

    ....
    _timerInterval = 1 << TransactionTable.timerInternalExponent;
    ....
  }
}

OpenRA

V3128 The 'Frames' field is used before it is initialized in constructor. CursorSequence.cs 35


public class CursorSequence
{
  ....
  public readonly ISpriteFrame[] Frames;

  public CursorSequence(
    FrameCache cache,
    string name,
    string cursorSrc,
    string palette,
    MiniYaml info
  )
  {
    var d = info.ToDictionary();

    Start = Exts.ParseIntegerInvariant(d["Start"].Value);
    Palette = palette;
    Name = name;

    if (
      (d.ContainsKey("Length") && d["Length"].Value == "*") ||
      (d.ContainsKey("End") && d["End"].Value == "*")
    )
      Length = Frames.Length - Start;
    else if (d.ContainsKey("Length"))
      Length = Exts.ParseIntegerInvariant(d["Length"].Value);
    else if (d.ContainsKey("End"))
      Length = Exts.ParseIntegerInvariant(d["End"].Value) - Start;
    else
      Length = 1;

    Frames = cache[cursorSrc]
      .Skip(Start)
      .Take(Length)
      .ToArray();

    ....
  }
}

Orleans

V3128 The 'ActivationId' property is used before it is initialized in constructor. SystemTarget.cs 83


public abstract class SystemTarget : ....
{
  ....
  internal SystemTarget(SystemTargetGrainId grainId,
                        SiloAddress silo,
                        bool lowPriority,
                        ILoggerFactory loggerFactory)
  {
    this.id = grainId;
    this.Silo = silo;
    this.ActivationAddress = GrainAddress.GetAddress(this.Silo,
                                                     this.id.GrainId,
                                                     this.ActivationId); // <=

    this.IsLowPriority = lowPriority;
    this.ActivationId = ActivationId                                     // <=
                        .GetDeterministic(grainId.GrainId);
    this.timerLogger = loggerFactory.CreateLogger<GrainTimer>();
    this.logger = loggerFactory.CreateLogger(this.GetType());
  }
  ....
}