Skip to content

Conversation

@alan008
Copy link

@alan008 alan008 commented Sep 5, 2025

Prevent "Variable 'size' might not have been initialized" warning.
Prevent "Variable 'when' might not have been initialized" warning.

When project is build with strict compiler rules (Variable might not have been initialized=Error) , it does not compile at all.

Summary by Bito

This PR fixes compilation issues by explicitly initializing previously uninitialized variables. It adds else blocks with Assert(False) statements in src/GpStuff.pas to ensure all code paths are covered. These changes properly handle 'when' and 'size' variables under strict compiler rules, with minor formatting improvements.

Prevent "Variable 'size' might not have been initialized" warning.
Prevent "Variable 'when' might not have been initialized" warning.
@bito-code-review
Copy link

bito-code-review bot commented Sep 5, 2025

Code Review Agent Run #f8f433

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 2d15895..2d15895
    • src/GpStuff.pas
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at gabr42@gmail.com.

Documentation & Help

AI Code Review powered by Bito Logo

@bito-code-review
Copy link

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Bug Fix - Fix Uninitialized Variables

GpStuff.pas - Added else blocks with Assert(False) to ensure 'when' and 'size' are always initialized, preventing uninitialized variable warnings during strict compilations.

@TommiPrami
Copy link
Contributor

The problem with this is that these kinds of warnings have changed so much over the years.

Very difficult or time consuming to make all IDE versions happy.

-tee-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants