summaryrefslogtreecommitdiffstats
path: root/src/account
diff options
context:
space:
mode:
authorRadek Novacek <rnovacek@redhat.com>2013-10-22 09:46:18 +0200
committerRadek Novacek <rnovacek@redhat.com>2013-10-22 09:46:18 +0200
commitf2d0282b3ca6e3ecc8ef6acec90ba1c8c08afb69 (patch)
tree63c4cad5b29a864a4a3b856e4c39f3dd387df75e /src/account
parent25734a3b0525fdabda6d975bf1909b46d99d08b8 (diff)
downloadopenlmi-providers-f2d0282b3ca6e3ecc8ef6acec90ba1c8c08afb69.tar.gz
openlmi-providers-f2d0282b3ca6e3ecc8ef6acec90ba1c8c08afb69.tar.xz
openlmi-providers-f2d0282b3ca6e3ecc8ef6acec90ba1c8c08afb69.zip
Fix some compilation warnings and coverity issues
Diffstat (limited to 'src/account')
-rw-r--r--src/account/LMI_GroupProvider.c7
-rw-r--r--src/account/indication_common.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/account/LMI_GroupProvider.c b/src/account/LMI_GroupProvider.c
index 79b6cd8..ff1955c 100644
--- a/src/account/LMI_GroupProvider.c
+++ b/src/account/LMI_GroupProvider.c
@@ -17,10 +17,13 @@
*
* Authors: Roman Rakus <rrakus@redhat.com>
*/
-
#include <konkret/konkret.h>
#include "LMI_Group.h"
+// Disable GLib deprecation warnings - GValueArray is deprecated but we
+// need it because libuser uses it
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <libuser/entity.h>
#include <libuser/user.h>
@@ -154,7 +157,7 @@ static CMPIrc delete_group(
struct lu_ent *lueg = NULL;
struct lu_ent *lueu = NULL;
GValueArray *users = NULL;
- char *username = NULL;
+ const char *username = NULL;
long group_gid = 0;
CMPIrc rc = CMPI_RC_OK;
diff --git a/src/account/indication_common.c b/src/account/indication_common.c
index 2c48609..70ce77b 100644
--- a/src/account/indication_common.c
+++ b/src/account/indication_common.c
@@ -125,7 +125,7 @@ bool watcher(void **data)
}
char buffer[BUF_LEN];
- int wd_pwd, wd_grp;
+ int wd_pwd, wd_grp = 0;
ADD_WATCH(fd, wd_pwd, PASSWD_FILE);
ADD_WATCH(fd, wd_grp, GROUP_FILE);