You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix dangling reference warnings in JSON parser tests
GCC 14's -Werror=dangling-reference detects references to values inside
temporary Result objects. The temporaries are destroyed at statement end,
leaving dangling references.
Solution: store intermediate Result objects to extend their lifetime
before taking references to their contents.
Applied to three test cases in parsers_test_suite.h:
- CanParseObjectInObject
- CanParseListInObject
- CanParseObjectInObjectAndIterateOverKeys
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Leonardo Rossetti <lrossett@redhat.com>
0 commit comments