Back

LL046

Uninitialized variable usage

Object Pascal — Delphi & Free Pascal
Warning
Reliability

Reading a variable before assignment yields unpredictable values and subtle bugs

reading a variable before assignment yields unpredictable values and subtle bugs.

Why this severity

reading a variable before assignment yields unpredictable values and subtle bugs.


Known false positives

variables initialized via out parameters or filled by API calls.

Remediation example

var
  SL: TStringList;
begin
  SL := TStringList.Create; // initialize before use

Reconnecting… Connection lost. Reload