[GH-ISSUE #15] [TheIDE] Functions possibly returning the address of a local variable. [-Wreturn-local-addr] #6

Closed
opened 2026-05-05 03:33:23 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @ismail-yilmaz on GitHub (Mar 8, 2020).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/15

OS: Linux (5.5.7)
UI: Gnome (3.34)
Compiler: GCC (9.2.1)

GCC complains about two related functions possibly returning the address of a local variable.

1b555b5385/uppsrc/ide/Browser/CodeBrowser.cpp (L237)

And

1b555b5385/uppsrc/ide/Browser/CodeBrowser.cpp (L242)

Originally created by @ismail-yilmaz on GitHub (Mar 8, 2020). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/15 OS: Linux (5.5.7) UI: Gnome (3.34) Compiler: GCC (9.2.1) GCC complains about two related functions possibly returning the address of a local variable. https://github.com/ultimatepp/ultimatepp/blob/1b555b5385b12de7e325f13285aa866e6cf93016/uppsrc/ide/Browser/CodeBrowser.cpp#L237 And https://github.com/ultimatepp/ultimatepp/blob/1b555b5385b12de7e325f13285aa866e6cf93016/uppsrc/ide/Browser/CodeBrowser.cpp#L242
Author
Owner

@mirek-fidler commented on GitHub (Mar 8, 2020):

This really seems border (for some specific Value, it would be true, but not those returned by Get(i, 1), however code does not know that...), but fix costs a little, so please test with current trunk/head.

<!-- gh-comment-id:596267800 --> @mirek-fidler commented on GitHub (Mar 8, 2020): This really seems border (for some specific Value, it would be true, but not those returned by Get(i, 1), however code does not know that...), but fix costs a little, so please test with current trunk/head.
Author
Owner

@ismail-yilmaz commented on GitHub (Mar 9, 2020):

Thank you.
Compiler warning is gone, and TheIDE compiles without any problem or warning.

<!-- gh-comment-id:596408430 --> @ismail-yilmaz commented on GitHub (Mar 9, 2020): Thank you. Compiler warning is gone, and TheIDE compiles without any problem or warning.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#6
No description provided.