On Wed, Apr 09, 2014 at 07:27:28PM +0200, Pavel Reichl wrote: > On Mon, 2014-04-07 at 18:13 +0200, Sumit Bose wrote: > > On Mon, Apr 07, 2014 at 02:22:04PM +0200, Pavel Reichl wrote: > > > Hello, > > > > > > I noticed these two warnings in clang. > > > > > > It would be great if the 2nd patch could be checked by Sumit to make > > > sure that the return value wasn't ignored on purpose. > > > > yes, I would prefer to ignore errors here. There might be various cases > > were we are not able to resolve a single SID but still can proceed with > > the others. > > Please see attached patch. Feel free to NACK it, if you think it's more > pain than gain.
Why not do something useful to avoid the compiler warning and print a SSSDBG_TRACE_ALL debug message with the returned error code in the case of an error? bye, Sumit > > > > > The first patch looks good, I'll run some tests and will give my results > > later. > > > > bye, > > Sumit > > > > > > > > Thanks, > > > > > > Pavel Reichl > > > > > _______________________________________________ > > sssd-devel mailing list > > sssd-devel@lists.fedorahosted.org > > https://lists.fedorahosted.org/mailman/listinfo/sssd-devel > > From 9f4cb8181f9d7aae4f66998fc79e776ca1c58e90 Mon Sep 17 00:00:00 2001 > From: Pavel Reichl <prei...@redhat.com> > Date: Wed, 9 Apr 2014 18:00:56 +0100 > Subject: [PATCH] PAC: fix clang warning > > Return value of sss_dp_get_account_recv is ignored on purpose. To avoid clang > warning cast to void is used. > --- > src/responder/pac/pacsrv_cmd.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/responder/pac/pacsrv_cmd.c b/src/responder/pac/pacsrv_cmd.c > index > 2fe76d1cf5e095bd89513ad5d72608dabea0939f..0ccd98c00cf798bd9a33cd27374fd3cf2d3fb435 > 100644 > --- a/src/responder/pac/pacsrv_cmd.c > +++ b/src/responder/pac/pacsrv_cmd.c > @@ -1092,6 +1092,9 @@ static void pac_lookup_sids_next_done(struct tevent_req > *subreq) > ret = sss_dp_get_account_recv(req, subreq, > &err_maj, &err_min, > &err_msg); > + /* To avoid clang warning about 'dead assignment'. */ > + (void) ret; > + > talloc_zfree(subreq); > talloc_zfree(err_msg); > /* Errors during individual lookups are ignored. */ > -- > 1.8.4.2 > > _______________________________________________ > sssd-devel mailing list > sssd-devel@lists.fedorahosted.org > https://lists.fedorahosted.org/mailman/listinfo/sssd-devel _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel