* 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
}
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;
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>
* 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 */
/* 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 */
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);
#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)