Eliminate "signed and unsigned type in conditional expression" warnings [-Wsign-compare]
git-svn-id: file:///home/hardaker/lib/sf-bkups/net-snmp-convert-svnrepo/trunk@18997 06827809-a52a-0410-b366-d66718629ded
diff --git a/agent/snmpd.c b/agent/snmpd.c
index fbb6959..7338042 100644
--- a/agent/snmpd.c
+++ b/agent/snmpd.c
@@ -1008,7 +1008,7 @@
info = getpwuid(uid);
if (info) {
DEBUGMSGTL(("snmpd/main", "Supplementary groups for %s.\n", info->pw_name));
- if (initgroups(info->pw_name, (gid != 0 ? gid : info->pw_gid)) == -1) {
+ if (initgroups(info->pw_name, (gid != 0 ? (gid_t)gid : info->pw_gid)) == -1) {
snmp_log_perror("initgroups failed");
if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) {
diff --git a/snmplib/keytools.c b/snmplib/keytools.c
index 27c4073..5da0d03 100644
--- a/snmplib/keytools.c
+++ b/snmplib/keytools.c
@@ -455,7 +455,7 @@
QUITFUN(SNMPERR_GENERR, encode_keychange_quit);
}
- properlength = SNMP_MIN((int) oldkey_len, properlength);
+ properlength = SNMP_MIN(oldkey_len, properlength);
/*
* Use the old key and some random bytes to encode the new key
diff --git a/snmplib/lcd_time.c b/snmplib/lcd_time.c
index 88bcb64..3e3b322 100644
--- a/snmplib/lcd_time.c
+++ b/snmplib/lcd_time.c
@@ -511,7 +511,7 @@
SNMP_FREE(context);
memset(buf, 0, SNMP_MAXBUF);
- return (rval < 0) ? rval : (additive % ETIMELIST_SIZE);
+ return (rval < 0) ? rval : (int)(additive % ETIMELIST_SIZE);
} /* end hash_engineID() */