diff options
author | Stef Walter <stef@memberwebs.com> | 2006-01-28 19:22:08 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-01-28 19:22:08 +0000 |
commit | 9c8b4f051ae56fa7ec4b30ed45836e9715fb3cc9 (patch) | |
tree | d191917f121b2cf8d158d6bd61287752218d0986 /tools | |
parent | 7996df8d6567eec464f5d4c427515daefe8e2373 (diff) |
Fix compile time warnings.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/rrdbot-create.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/rrdbot-create.c b/tools/rrdbot-create.c index 6e2f143..73a5541 100644 --- a/tools/rrdbot-create.c +++ b/tools/rrdbot-create.c @@ -40,6 +40,11 @@ #include <errno.h> #include <unistd.h> #include <stdarg.h> +#include <err.h> + +#include <rrd.h> + +#include "config-parser.h" /* ----------------------------------------------------------------------------- * CONSTANTS @@ -143,7 +148,7 @@ create_file(create_ctx* ctx, const char* rrd) opterr = 0; rrd_clear_error(); - r = rrd_create(argc, argv); + r = rrd_create(argc, (char**)argv); if(r != 0) warnx("couldn't create rrd file: %s: %s", rrd, rrd_get_error()); @@ -276,7 +281,7 @@ cfg_value(const char* filename, const char* header, const char* name, /* Only process this section */ if(strcmp(header, CONFIG_CREATE) != 0) - return; + return 0; /* The rra option */ if(strcmp(name, CONFIG_RRA) == 0) @@ -296,7 +301,7 @@ cfg_value(const char* filename, const char* header, const char* name, warnx("%s: the '%s' field name must only contain characters, digits, underscore and dash", ctx->confname, field); ctx->skip = 1; - return; + return 0; } add_field(ctx, field, value); @@ -345,7 +350,6 @@ main(int argc, char* argv[]) const char* confdir = DEFAULT_CONFIG; create_ctx ctx; char ch; - char* t; memset(&ctx, 0, sizeof(ctx)); ctx.workdir = DEFAULT_WORK; |