summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 29d7bef)
raw | patch | inline | side by side (parent: 29d7bef)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 14 Jan 2008 16:50:51 +0000 (16:50 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 14 Jan 2008 16:50:51 +0000 (16:50 +0000) |
* fixed many compiler warnings
-- Peter Breitenlohner peb mppmu.mpg.de
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1269 a5681a0c-68f1-0310-ab6d-d61299d08faa
-- Peter Breitenlohner peb mppmu.mpg.de
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1269 a5681a0c-68f1-0310-ab6d-d61299d08faa
diff --git a/bindings/tcl/tclrrd.c b/bindings/tcl/tclrrd.c
index c5a899a1ff1b0550b24c2fa8831d81913d24013c..c99c1b08354f46ef11efa074a590708748368f52 100644 (file)
--- a/bindings/tcl/tclrrd.c
+++ b/bindings/tcl/tclrrd.c
}
static void getopt_free_element(
- argv2,
- argn)
- char *argv2[];
- int argn;
+ char *argv2[],
+ int argn)
{
if (argv2[argn] != NULL) {
free(argv2[argn]);
}
static void getopt_squieeze(
- argc,
- argv2)
- int *argc;
- char *argv2[];
+ int *argc,
+ char *argv2[])
{
int i, null_i = 0, argc_tmp = *argc;
diff --git a/configure.ac b/configure.ac
index 101520f5d05d1fd5a8f77f3be9a66231c9fb9b94..7cadc3bd3cfdab8b0d58538c0453750abdf7c75d 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AH_BOTTOM([
/* make sure that we pickup the correct stuff from all headers */
#ifdef HAVE_FEATURES_H
+#undef _XOPEN_SOURCE /* keep unmodified */
+#undef _BSD_SOURCE /* keep unmodified */
#define _XOPEN_SOURCE 600
#define _BSD_SOURCE 1
# include <features.h>
diff --git a/src/parsetime.c b/src/parsetime.c
index a2b76eda6a7d67c2e9c5ad133e47bcca9717f47e..4c0f089bac9bfdc9e21ac88a1780c1a7d03f67d9 100644 (file)
--- a/src/parsetime.c
+++ b/src/parsetime.c
* required for us to be able distinguish between 'mon' as 'month'
* and 'mon' as 'monday'
*/
-static struct SpecialToken *Specials;
+static const struct SpecialToken *Specials;
static const char **scp; /* scanner - pointer at arglist */
static char scc; /* scanner - count of remaining arguments */
diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c
index fba2204889dbd78c1c82e207ee7e3e739381611a..844f9ac6ebe5b310db2c5253b9a1246fbe647373 100644 (file)
--- a/src/rrd_cgi.c
+++ b/src/rrd_cgi.c
/* try to find out if there's already such a variable */
for (k = 0; k < i && (strncmp(result[k]->name, cp, esp - cp)
- || !(strlen(result[k]->name) == esp - cp));
+ || !(strlen(result[k]->name) == (size_t)(esp - cp)));
k++);
if (k == i) { /* No such variable yet */
diff --git a/src/rrd_create.c b/src/rrd_create.c
index f636961ba5015c60dde6ac6e5abaca7fcea66232..f948f3aa5fef6337a88b9d31128d49d18c5ef50c 100644 (file)
--- a/src/rrd_create.c
+++ b/src/rrd_create.c
rrd_t rrd_dn;
if ((rrd_file =
- open(file_name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == NULL) {
+ open(file_name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
rrd_set_error("creating '%s': %s", file_name, rrd_strerror(errno));
rrd_free(rrd);
return (-1);
diff --git a/src/rrd_nan_inf.c b/src/rrd_nan_inf.c
index b13264e43a8c76254be130c91df04281b0b08558..1787948e409ea570af345a33a3bc757fe12ddeea 100644 (file)
--- a/src/rrd_nan_inf.c
+++ b/src/rrd_nan_inf.c
#define INF_FUNC (double)fabs((double)log(0.0))
#else
+#include "rrd.h"
#define NAN_FUNC (double)(0.0/0.0)
#define INF_FUNC (double)(1.0/0.0)