URL:
https://github.com/SSSD/sssd/pull/140
Title: #140: gcc7 related fixes
fidencio commented:
"""
On Tue, Jan 31, 2017 at 10:29 AM, lslebodn <notifications(a)github.com> wrote:
On (30/01/17 23:52), fidencio wrote:
>fidencio requested changes on this pull request.
>
>Neither the short log or the log are consistent between the patches.
>Please, let's try to follow the git-commit-template.
>
>Also, there are some questions in two of the patches, which are basically curiosity.
>
Could you be more specific?
There is just missing ticket in messages. Because ther is not a ticket.
* sssctl: Fix warning may be used uninitialized:
Component should be in capital letters according to the git-commit-template
* pam_sss: Suppress warning format-truncation
Same comment
* Suppres implicit-fallthrough from gcc 7
Some kind of comments are recognized by gcc 7
but they are ignored with -Wimplicit-fallthrough=5
and only attributes disable the warning.
Please, don't break the lines with 52 characters. Do it on 72 as recommended.
I know the recommendation is "do not exceed 72 (...)" and you don't
exceed. But we're not going to take this path as someone may write a
commit message with a word per-line just because it doesn't exceed the
72 characters :-)
>> case 1:
> k1 ^= tail[0];
> k1 *= c1;
> k1 = rotl(k1, 15);
> k1 *= c2;
> h1 ^= k1;
>+ break;
>
>Why have you decided to not use SSS_ATTRIBUTE_FALLTHROUGH here as well?
>
because it does not chage semantic and looks better
then the attribute or comment.
Fine by me.
>> @@ -434,8 +434,8 @@ static errno_t sssctl_fetch_object(TALLOC_CTX *mem_ctx,
> struct sss_domain_info **_dom)
> {
> TALLOC_CTX *tmp_ctx;
>- struct sysdb_attrs *entry;
>- struct sss_domain_info *dom;
>+ struct sysdb_attrs *entry = NULL;
>+ struct sss_domain_info *dom = NULL;
>
>I'm curious why just this code path triggered the issue.
>We have similar code in a lot of other places (even in the same file).
>
Could you be more specific?
Because sssctl_find_object is called just once and there is something
smelly (hyper optimized) there.
Let me try to re-phrase. Is there any other part of the code where we
can be bite by the very same issue?
In a lot of places we don't initialize the output vars and may be the
case we end up hitting this very same "smelly hyper optimization" as
well.
Best Regards,
--
Fabiano FidĂȘncio
"""
See the full comment at
https://github.com/SSSD/sssd/pull/140#issuecomment-276346797