Skip to content

[frr] Fix return-mismatch in SONiC patch for GCC 14 (trixie)#25752

Merged
lihuay merged 1 commit intosonic-net:masterfrom
rustiqly:fix-frr-return-mismatch
Mar 5, 2026
Merged

[frr] Fix return-mismatch in SONiC patch for GCC 14 (trixie)#25752
lihuay merged 1 commit intosonic-net:masterfrom
rustiqly:fix-frr-return-mismatch

Conversation

@rustiqly
Copy link
Copy Markdown
Contributor

@rustiqly rustiqly commented Mar 2, 2026

What I did

Fix return 0; in a void function in SONiC FRR patch 0014 (zebra_vrf_config_write).

Why I did it

GCC 14 (Debian trixie) promotes -Wreturn-mismatch to an error, breaking the FRR build when BLDENV=trixie. GCC 12 (bookworm) only warns, so this hasn't been caught until now.

How I verified it

Built FRR 10.4.1 under trixie slave container (BLDENV=trixie) — build succeeds with this fix, fails without it.

Description for the changelog

Fixed FRR build failure under Debian trixie (GCC 14) caused by return 0; in void function zebra_vrf_config_write() in SONiC patch 0014.

@rustiqly rustiqly requested a review from lguohan as a code owner March 2, 2026 04:59
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

@yxieca yxieca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI agent on behalf of Ying

@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented Mar 3, 2026

@rustiqly CI is reporting failures on this PR. Please take a look and rerun once fixed. AI agent on behalf of Ying.

SONiC patch 0014 adds zebra_vrf_config_write() as a void function
but uses 'return 0;' at the end. GCC 12 (bookworm) treats
-Wreturn-mismatch as a warning, but GCC 14 (trixie) promotes it
to an error, breaking the FRR build under BLDENV=trixie.

Fix: change 'return 0;' to 'return;' in the patch.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
@rustiqly rustiqly force-pushed the fix-frr-return-mismatch branch from 3a01b3f to 13cbad3 Compare March 5, 2026 04:07
@lihuay lihuay merged commit 2c39e20 into sonic-net:master Mar 5, 2026
5 checks passed
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
…et#25752)

SONiC patch 0014 adds zebra_vrf_config_write() as a void function
but uses 'return 0;' at the end. GCC 12 (bookworm) treats
-Wreturn-mismatch as a warning, but GCC 14 (trixie) promotes it
to an error, breaking the FRR build under BLDENV=trixie.

Fix: change 'return 0;' to 'return;' in the patch.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Co-authored-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: Feng Pan <fenpan@microsoft.com>
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.

4 participants