[SSSD] [PATCHES] cache_req improvements

Pavel Březina pbrezina at redhat.com
Thu Mar 12 11:34:52 UTC 2015


On 03/12/2015 12:30 PM, Jakub Hrozek wrote:
> On Thu, Mar 12, 2015 at 11:50:21AM +0100, Jakub Hrozek wrote:
>> On Thu, Mar 12, 2015 at 11:16:41AM +0100, Jakub Hrozek wrote:
>>> I'm also waiting for a Coverity check to finish.
>>
>> There are some warnings, mostly the same problem copied around:
>> Error: COMPILER_WARNING:
>> sssd-1.12.90/src/responder/common/responder_cache_req.c:232:8: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> #     if (ret == EEXIST) {
>> #        ^
>> sssd-1.12.90/src/responder/common/responder_cache_req.c:212:13: note: 'ret' was declared here
>> #     errno_t ret;
>> #             ^
>>
>> Error: COMPILER_WARNING:
>> sssd-1.12.90/src/responder/common/responder_cache_req.c: scope_hint: In function 'cache_req_get_object'
>> sssd-1.12.90/src/responder/common/responder_cache_req.c:343:8: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> #     if (ret != EOK) {
>> #        ^
>>
>> Error: COMPILER_WARNING:
>> sssd-1.12.90/src/responder/common/responder_cache_req.c:348:30: warning: 'one_item_only' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> #     } else if (one_item_only && result->count > 1) {
>> #                              ^
>>
>> Error: COMPILER_WARNING:
>> sssd-1.12.90/src/responder/common/responder_cache_req.c:26: included_from: Included from here.
>> sssd-1.12.90/src/responder/common/responder_cache_req.c: scope_hint: In function 'cache_req_cache_done'
>> sssd-1.12.90/src/util/util.h:130:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> #         debug_fn(__FILE__, __LINE__, __FUNCTION__, \
>> #         ^
>> sssd-1.12.90/src/responder/common/responder_cache_req.c:243:13: note: 'ret' was declared here
>> #     errno_t ret;
>> #             ^
>>
>> I think it's fine to initialize ret to ERR_INTERNAL in that case. We know
>> that one of the 'case' statements would hit, so this change could be just
>> another precaution.
>
> btw CI passed: http://sssd-ci.duckdns.org/logs/job/10/53/summary.html

Thanks.

Since those warning comes from original code that is already present in 
master, it is fixed in a separate patch (#1).




-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cache_req-fix-coverity-warings.patch
Type: text/x-patch
Size: 1346 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-cache_req-tests-rename-test_user-to-test_user_by_nam.patch
Type: text/x-patch
Size: 8429 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-cache_req-tests-define-user-name-constant.patch
Type: text/x-patch
Size: 4452 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-cache_req-preparations-for-different-input-type.patch
Type: text/x-patch
Size: 24806 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-cache_req-add-support-for-user-by-uid.patch
Type: text/x-patch
Size: 25602 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-cache_req-add-support-for-group-by-name.patch
Type: text/x-patch
Size: 20343 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-cache_req-remove-default-branch-from-switches.patch
Type: text/x-patch
Size: 2514 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-cache_req-add-support-for-group-by-id.patch
Type: text/x-patch
Size: 19920 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-cmocka-include-mock_parse_inp-in-header-file.patch
Type: text/x-patch
Size: 930 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-cache_req-parse-input-name-if-needed.patch
Type: text/x-patch
Size: 20001 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-cache_req-return-ERR_INTERNAL-if-more-than-one-entry.patch
Type: text/x-patch
Size: 1134 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150312/2375e2cd/attachment-0010.bin>


More information about the sssd-devel mailing list