ehlo, Patches are attached.
Comment to patch 0001 dp_refresh.h and dp_ptask contain comment "/* solve circular dependency */" and forward declaration of some structures was after this comment. But circular dependency was there. LS
>From 6ad30cbfe31afb51a8fb948c707ba71c2aa3ee60 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik <[email protected]> Date: Wed, 21 Aug 2013 11:51:36 +0200 Subject: [PATCH 1/3] Remove include recursion warning reported by coverity include_recursion: #include file "src/providers/dp_backend.h" includes itself: dp_backend.h -> dp_refresh.h -> dp_backend.h (other events go to each file) primary_file: During compilation of file 'src/krb5_plugin/sssd_krb5_locator_plugin.c include_recursion: #include file "src/providers/dp_backend.h" includes itself: dp_backend.h -> dp_refresh.h -> dp_ptask.h -> dp_backend.h (other events go to each file) primary_file: During compilation of file 'src/krb5_plugin/sssd_krb5_locator_plugin.c' --- src/providers/dp_ptask.h | 2 -- src/providers/dp_refresh.h | 1 - 2 files changed, 3 deletions(-) diff --git a/src/providers/dp_ptask.h b/src/providers/dp_ptask.h index 7e45862e46c5d9da4eaedca5312e25dcc0eb8abe..6a241fb7ae6ccba91eb5520f5f89d6c9e208cf05 100644 --- a/src/providers/dp_ptask.h +++ b/src/providers/dp_ptask.h @@ -25,8 +25,6 @@ #include <talloc.h> #include <time.h> -#include "providers/dp_backend.h" - /* solve circular dependency */ struct be_ctx; diff --git a/src/providers/dp_refresh.h b/src/providers/dp_refresh.h index 0dedbc3c14bfb661ebf296a9021fa397769dee66..0c4d4a08e935b269f53867b0fe9946eabe521a4f 100644 --- a/src/providers/dp_refresh.h +++ b/src/providers/dp_refresh.h @@ -24,7 +24,6 @@ #include <tevent.h> #include <talloc.h> -#include "providers/dp_backend.h" #include "providers/dp_ptask.h" /* solve circular dependency */ -- 1.8.3.1
>From 763086bc45b8814751260ed5654051354c245e54 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik <[email protected]> Date: Wed, 21 Aug 2013 11:13:56 +0200 Subject: [PATCH 2/3] Use brackets around macros. warnings reported by cppcheck. --- src/monitor/monitor.c | 8 ++++---- src/util/child_common.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 67811ac16f91fa4e6f97ab2cf2ff977855d95751..7604b30988502fcea32ee81b936083a99d53c939 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -1420,9 +1420,9 @@ static void monitor_quit(struct mt_ctx *mt_ctx, int ret) } } else if (pid != 0) { error = 0; - if WIFEXITED(status) { + if (WIFEXITED(status)) { DEBUG(1, ("Child [%s] exited gracefully\n", svc->name)); - } else if WIFSIGNALED(status) { + } else if (WIFSIGNALED(status)) { DEBUG(1, ("Child [%s] terminated with a signal\n", svc->name)); } else { DEBUG(0, ("Child [%s] did not exit cleanly\n", svc->name)); @@ -2573,11 +2573,11 @@ static void mt_svc_exit_handler(int pid, int wait_status, void *pvt) struct timeval tv; int restart_delay; - if WIFEXITED(wait_status) { + if (WIFEXITED(wait_status)) { DEBUG(SSSDBG_OP_FAILURE, ("Child [%s] exited with code [%d]\n", svc->name, WEXITSTATUS(wait_status))); - } else if WIFSIGNALED(wait_status) { + } else if (WIFSIGNALED(wait_status)) { DEBUG(SSSDBG_OP_FAILURE, ("Child [%s] terminated with signal [%d]\n", svc->name, WTERMSIG(wait_status))); diff --git a/src/util/child_common.c b/src/util/child_common.c index ec2baf0192cf46cda72b596a4def0ceb77880005..2bd2bbc3a557ea61c3bcf517a48b3673bd3d6d4f 100644 --- a/src/util/child_common.c +++ b/src/util/child_common.c @@ -553,22 +553,22 @@ void child_sig_handler(struct tevent_context *ev, } else if (ret == 0) { DEBUG(1, ("waitpid did not found a child with changed status.\n")); } else { - if WIFEXITED(child_ctx->child_status) { + if (WIFEXITED(child_ctx->child_status)) { if (WEXITSTATUS(child_ctx->child_status) != 0) { DEBUG(1, ("child [%d] failed with status [%d].\n", ret, WEXITSTATUS(child_ctx->child_status))); } else { DEBUG(4, ("child [%d] finished successfully.\n", ret)); } - } else if WIFSIGNALED(child_ctx->child_status) { + } else if (WIFSIGNALED(child_ctx->child_status)) { DEBUG(1, ("child [%d] was terminated by signal [%d].\n", ret, WTERMSIG(child_ctx->child_status))); } else { - if WIFSTOPPED(child_ctx->child_status) { + if (WIFSTOPPED(child_ctx->child_status)) { DEBUG(7, ("child [%d] was stopped by signal [%d].\n", ret, WSTOPSIG(child_ctx->child_status))); } - if WIFCONTINUED(child_ctx->child_status) { + if (WIFCONTINUED(child_ctx->child_status)) { DEBUG(7, ("child [%d] was resumed by delivery of SIGCONT.\n", ret)); } -- 1.8.3.1
>From 2dd24374094915d64d76529a6ae8e5e1e413d3a1 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik <[email protected]> Date: Wed, 21 Aug 2013 11:22:36 +0200 Subject: [PATCH 3/3] Fix memory leak insss_krb5_get_error_message warning reported by cppcheck --- src/util/sss_krb5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c index b871b13c33e601513d3d9ea49cfa2c7aca0cf886..d2e432a2146ff83eba95474a7c37c2f975fd85e7 100644 --- a/src/util/sss_krb5.c +++ b/src/util/sss_krb5.c @@ -485,6 +485,7 @@ const char *KRB5_CALLCONV sss_krb5_get_error_message(krb5_context ctx, ret = snprintf(s, size, "Kerberos error [%12d]", ec); if (ret < 0 || ret >= size) { + free(s); return NULL; } -- 1.8.3.1
_______________________________________________ sssd-devel mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
