summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 03ed251)
raw | patch | inline | side by side (parent: 03ed251)
author | Florian Forster <octo@collectd.org> | |
Wed, 8 Jul 2015 10:36:35 +0000 (12:36 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 8 Jul 2015 10:36:35 +0000 (12:36 +0200) |
src/daemon/common.c | patch | blob | history | |
src/libcollectdclient/network.c | patch | blob | history | |
src/liboconfig/oconfig.c | patch | blob | history |
diff --git a/src/daemon/common.c b/src/daemon/common.c
index 92950deded7721646414edcbe5cc9c603f5ef836..068b9999c6fa7649986268a2707bbb993339970f 100644 (file)
--- a/src/daemon/common.c
+++ b/src/daemon/common.c
assert ((0 > status) || (nleft >= (size_t)status));
- nleft = nleft - status;
- ptr = ptr + status;
+ nleft = nleft - ((size_t) status);
+ ptr = ptr + ((size_t) status);
}
return (0);
if (status < 0)
return (status);
- nleft = nleft - status;
- ptr = ptr + status;
+ nleft = nleft - ((size_t) status);
+ ptr = ptr + ((size_t) status);
}
return (0);
* Join the components together again
*/
dir[0] = '/';
- if (strjoin (dir + path_is_absolute, dir_len - path_is_absolute,
- fields, i + 1, "/") < 0)
+ if (strjoin (dir + path_is_absolute, (size_t) (dir_len - path_is_absolute),
+ fields, (size_t) (i + 1), "/") < 0)
{
ERROR ("strjoin failed: `%s', component #%i", file_orig, i);
return (-1);
index c390a1ce7cada8de9b029cb5d088de05ad0c8c3e..f76be5ba7cadeb976a1e84f33b36d2f8d09fef46 100644 (file)
int lcc_server_set_interface (lcc_server_t *srv, char const *interface) /* {{{ */
{
- int if_index;
+ unsigned int if_index;
int status;
if ((srv == NULL) || (interface == NULL))
@@ -421,7 +421,7 @@ int lcc_server_set_interface (lcc_server_t *srv, char const *interface) /* {{{ *
memset (&mreq, 0, sizeof (mreq));
mreq.imr_multiaddr.s_addr = addr->sin_addr.s_addr;
mreq.imr_address.s_addr = ntohl (INADDR_ANY);
- mreq.imr_ifindex = if_index;
+ mreq.imr_ifindex = (int) if_index;
#else
struct ip_mreq mreq;
index f422f5adcb905e1d2bb5abed011ba10424c779a6..ba93062cddef8b2498a6895daa9746911eeb2cc1 100644 (file)
--- a/src/liboconfig/oconfig.c
+++ b/src/liboconfig/oconfig.c
{
int i;
- ci_copy->values = (oconfig_value_t *) calloc (ci_orig->values_num,
- sizeof (*ci_copy->values));
+ ci_copy->values = (oconfig_value_t *) calloc ((size_t) ci_orig->values_num,
+ sizeof (*ci_copy->values));
if (ci_copy->values == NULL)
{
fprintf (stderr, "calloc failed.\n");
{
int i;
- ci_copy->children = (oconfig_item_t *) calloc (ci_orig->children_num,
- sizeof (*ci_copy->children));
+ ci_copy->children = (oconfig_item_t *) calloc ((size_t) ci_orig->children_num,
+ sizeof (*ci_copy->children));
if (ci_copy->children == NULL)
{
fprintf (stderr, "calloc failed.\n");