From: Sebastian Harl Date: Sat, 26 Apr 2014 10:28:17 +0000 (+0200) Subject: Fixed invalid type conversions. X-Git-Tag: v1.5.0-rc1~108^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18aee1571fbed37898b7cbae4903754999762e1f;p=thirdparty%2Frrdtool-1.x.git Fixed invalid type conversions. --- diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c index c35dfa81..6fa2810d 100644 --- a/bindings/ruby/main.c +++ b/bindings/ruby/main.c @@ -51,7 +51,7 @@ string_arr string_arr_new( a.strings[i + 1] = strdup(StringValuePtr(v)); break; case T_FIXNUM: - snprintf(buf, 63, "%ld", FIX2INT(v)); + snprintf(buf, 63, "%d", FIX2INT(v)); a.strings[i + 1] = strdup(buf); break; default: diff --git a/bindings/tcl/tclrrd.c b/bindings/tcl/tclrrd.c index 869d6c78..c9fb8952 100644 --- a/bindings/tcl/tclrrd.c +++ b/bindings/tcl/tclrrd.c @@ -463,7 +463,7 @@ static int Rrd_Graph( { Tcl_Channel channel; int mode, fd2; - ClientData fd1; + int fd1; FILE *stream = NULL; char **calcpr = NULL; int rc, xsize, ysize; @@ -494,7 +494,7 @@ static int Rrd_Graph( strerror(Tcl_GetErrno()), (char *) NULL); return TCL_ERROR; } - if (Tcl_GetChannelHandle(channel, TCL_WRITABLE, &fd1) != TCL_OK) { + if (Tcl_GetChannelHandle(channel, TCL_WRITABLE, (ClientData)&fd1) != TCL_OK) { Tcl_AppendResult(interp, "cannot get file descriptor associated with \"", argv[1], "\"", (char *) NULL); @@ -504,7 +504,7 @@ static int Rrd_Graph( * Must dup() file descriptor so we can fclose(stream), otherwise the fclose() * would close Tcl's file descriptor */ - if ((fd2 = dup((int)fd1)) == -1) { + if ((fd2 = dup(fd1)) == -1) { Tcl_AppendResult(interp, "dup() failed for file descriptor associated with \"", argv[1], "\": ", strerror(errno), (char *) NULL);