-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: APIs
-
Storage Engines
-
5
-
StorEng - Defined Pipeline
This is motivated by WT-13880 where a session->truncate wasn't wrapped in testutil_check so the invalid API call failed silently.
WiredTiger adds WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)) too all of its internal functions to prevent issues like this, but we don't set it on the public API functions of session/connection/cursor.
This is reasonable as we don't want to overly constrain external users, but it would be good to have a flag that enforces this for our testing.
The scope of this ticket is a timeboxed investigation of enabling warn_unused_result - or an alternate flag that does the same thing - for our csuite and cppsuite testing.
We need to make sure this flag is only enabled when explicitly requested by a user. i.e. this flag should not be enabled by setting HAVE_DIAGNOSTIC.