On 01/10/2015 06:12 PM, Lukas Slebodnik wrote:
ehlo,
talloc_steal is a macro around function _talloc_steal_loc
and returns the pointer that you pass it. It does not have any failure modes.
If the output value is ignored there are compiler warnings.
Example of warning
src/util/util.c:503:164: warning: expression result unused [-Wunused-value]
({ __typeof__(internal_ctx) __talloc_steal_ret =
(__typeof__(internal_ctx))_talloc_steal_loc((table),(internal_ctx),
"../sssd/src/util/util.c" ":" "503"); __talloc_steal_ret;
});
^~~~~~~~~~~~~~~~~~
1 warning generated.
I am opened to better solution of this warning.
LS
I would ignore this warning. Ignoring return value has lots of use cases.