summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9f342f)
raw | patch | inline | side by side (parent: a9f342f)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 14 Jan 2008 16:47:23 +0000 (16:47 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 14 Jan 2008 16:47:23 +0000 (16:47 +0000) |
* fix rrdcgi warning
* fix warnings in tcl bindings
-- Peter Breitenlohner peb mppmu.mpg.de
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1268 a5681a0c-68f1-0310-ab6d-d61299d08faa
* fix warnings in tcl bindings
-- Peter Breitenlohner peb mppmu.mpg.de
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1268 a5681a0c-68f1-0310-ab6d-d61299d08faa
bindings/tcl/tclrrd.c | patch | blob | history | |
configure.ac | patch | blob | history | |
src/rrd_cgi.c | patch | blob | history |
diff --git a/bindings/tcl/tclrrd.c b/bindings/tcl/tclrrd.c
index 11d25dfae86d276fe680725aa4863d83a9d10f15..841978c79f2c1f7f6b341bfb12fa3458f2e2d095 100644 (file)
--- a/bindings/tcl/tclrrd.c
+++ b/bindings/tcl/tclrrd.c
@@ -100,6 +100,8 @@ Rrd_Create(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *ar
unsigned long int pdp_step = 300;
struct rrd_time_value last_up_tv;
+ (void) clientData; /* slience gcc */
+
argv2 = getopt_init(argc, argv);
for (argv_i = 1; argv_i < argc; argv_i++) {
@@ -169,7 +171,7 @@ Rrd_Create(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *ar
return TCL_ERROR;
}
- rrd_create_r(argv2[1], pdp_step, last_up, argc - 2, argv2 + 2);
+ rrd_create_r(argv2[1], pdp_step, last_up, argc - 2, (const char **) argv2 + 2);
getopt_cleanup(argc, argv2);
@@ -189,6 +191,8 @@ Rrd_Create(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *ar
static int
Rrd_Dump(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[])
{
+ (void) clientData; /* slience gcc */
+
if (argc < 2) {
Tcl_AppendResult(interp, "RRD Error: needs rrd filename",
(char *) NULL);
@@ -215,6 +219,8 @@ Rrd_Dump(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv
static int
Rrd_Last(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[])
{
+ (void) clientData; /* slience gcc */
+
time_t t;
if (argc < 2) {
@@ -246,6 +252,8 @@ Rrd_Update(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *ar
int argv_i;
char **argv2, *template = NULL;
+ (void) clientData; /* slience gcc */
+
argv2 = getopt_init(argc, argv);
for (argv_i = 1; argv_i < argc; argv_i++) {
@@ -291,7 +299,7 @@ Rrd_Update(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *ar
return TCL_ERROR;
}
- rrd_update_r(argv2[1], template, argc - 2, argv2 + 2);
+ rrd_update_r(argv2[1], template, argc - 2, (const char **) argv2 + 2);
if (template != NULL) {
free(template);
@@ -319,6 +327,8 @@ Rrd_Lastupdate(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char
Tcl_Obj *listPtr;
unsigned long ds_cnt, i;
+ (void) clientData; /* slience gcc */
+
argv2 = getopt_init(argc, argv);
if (rrd_lastupdate(argc-1, argv2, &last_update,
&ds_cnt, &ds_namv, &last_ds) == 0) {
@@ -358,6 +368,8 @@ Rrd_Fetch(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *arg
char s[30];
char **argv2;
+ (void) clientData; /* slience gcc */
+
argv2 = getopt_init(argc, argv);
if (rrd_fetch(argc, argv2, &start, &end, &step,
&ds_cnt, &ds_namv, &data) != -1) {
@@ -402,6 +414,8 @@ Rrd_Graph(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *arg
char **argv2;
CONST84 char *save;
+ (void) clientData; /* slience gcc */
+
/*
* If the "filename" is a Tcl fileID, then arrange for rrd_graph() to write to
* that file descriptor. Will this work with windoze? I have no idea.
@@ -496,6 +510,8 @@ Rrd_Tune(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv
{
char **argv2;
+ (void) clientData; /* slience gcc */
+
argv2 = getopt_init(argc, argv);
rrd_tune(argc, argv2);
getopt_cleanup(argc, argv2);
@@ -517,6 +533,8 @@ Rrd_Resize(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *ar
{
char **argv2;
+ (void) clientData; /* slience gcc */
+
argv2 = getopt_init(argc, argv);
rrd_resize(argc, argv2);
getopt_cleanup(argc, argv2);
@@ -538,6 +556,8 @@ Rrd_Restore(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *a
{
char **argv2;
+ (void) clientData; /* slience gcc */
+
argv2 = getopt_init(argc, argv);
rrd_restore(argc, argv2);
getopt_cleanup(argc, argv2);
diff --git a/configure.ac b/configure.ac
index aa8c5203ead755d7894c2c9dc1520e79e4675d82..561241814a137488679a31cf23a899c99929c89c 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AH_BOTTOM([
#ifdef HAVE_FEATURES_H
-#define _XOPEN_SOURCE 600
+#define _XOPEN_SOURCE 600
+#undef _BSD_SOURCE /* comment to prevent configure from modifying this line */
#define _BSD_SOURCE 1
# include <features.h>
#endif
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
-AC_CHECK_HEADERS( sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h float.h strings.h)
+AC_CHECK_HEADERS( features.h sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h float.h strings.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c
index 8038a3082334dedf411a0e7f70f0102125b1c181..7e8aa32253078d8c8b67cd331db957dc95fe3d03 100644 (file)
--- a/src/rrd_cgi.c
+++ b/src/rrd_cgi.c
if (i<numargs) {
/* 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)); k++);
+ for (k=0; k<i && (strncmp (result[k]->name,cp, esp-cp) || !(strlen (result[k]->name) == (size_t)(esp-cp))); k++);
if (k == i) { /* No such variable yet */
if ((result[i] = (s_var *)malloc(sizeof(s_var))) == NULL)