[SSSD] [PATCH] NSS: Fix warning enumerated type mixed with another type
Lukas Slebodnik
lslebodn at redhat.com
Fri Nov 7 13:04:48 UTC 2014
ehlo,
src/responder/nss/nsssrv_cmd.c:688: mixed_enum_type: enumerated type mixed with
another type
"enum sss_dp_acct_type" was mixed with type "int". ANSI C is not very
strict in this.
simple patch is attached.
LS
-------------- next part --------------
>From 7b9acaf6720117e7573b6082710142622b9d5840 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Thu, 6 Nov 2014 14:06:03 +0100
Subject: [PATCH] NSS: Fix warning enumerated type mixed with another type
src/responder/nss/nsssrv_cmd.c:688: mixed_enum_type: enumerated type mixed with
another type
"enum sss_dp_acct_type" was mixed with type "int". ANSI C is not very
strict in this.
---
src/responder/nss/nsssrv_cmd.c | 6 +++---
src/responder/nss/nsssrv_private.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index c9c09a082b67741e1d229b419aa7c3ecbf195ddd..ea58920bc3611c84958e8d0aca0e122d90c68e5c 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -561,7 +561,7 @@ static int nss_cmd_getpw_send_reply(struct nss_dom_ctx *dctx, bool filter)
/* Currently only refreshing expired netgroups is supported. */
static bool
-is_refreshed_on_bg(int req_type,
+is_refreshed_on_bg(enum sss_dp_acct_type req_type,
enum sss_dp_acct_type refresh_expired_interval)
{
if (refresh_expired_interval == 0) {
@@ -584,7 +584,7 @@ static void nsssrv_dp_send_acct_req_done(struct tevent_req *req);
errno_t check_cache(struct nss_dom_ctx *dctx,
struct nss_ctx *nctx,
struct ldb_result *res,
- int req_type,
+ enum sss_dp_acct_type req_type,
const char *opt_name,
uint32_t opt_id,
const char *extra,
@@ -4169,7 +4169,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
char *name = NULL;
char *req_name;
uint32_t req_id;
- int req_type;
+ enum sss_dp_acct_type req_type;
nctx = talloc_get_type(cctx->rctx->pvt_ctx, struct nss_ctx);
diff --git a/src/responder/nss/nsssrv_private.h b/src/responder/nss/nsssrv_private.h
index e5f3bde506d614fe3ce41d5bfc01de978f37fd36..e9f00b114975ef760aaaac45e6e91f6e40c52b9a 100644
--- a/src/responder/nss/nsssrv_private.h
+++ b/src/responder/nss/nsssrv_private.h
@@ -120,7 +120,7 @@ void nss_setent_notify_done(struct getent_ctx *getent_ctx);
errno_t check_cache(struct nss_dom_ctx *dctx,
struct nss_ctx *nctx,
struct ldb_result *res,
- int req_type,
+ enum sss_dp_acct_type req_type,
const char *opt_name,
uint32_t opt_id,
const char *extra,
--
2.1.0
More information about the sssd-devel
mailing list