[Pkg-octave-commit] [SCM] octave-graceplot branch, master, updated. f36b502b6684766394517182ba2faeabb21cfb69
Rafael Laboissiere
rafael at debian.org
Sun May 17 15:15:49 UTC 2009
The following commit has been merged in the master branch:
commit f36b502b6684766394517182ba2faeabb21cfb69
Author: Rafael Laboissiere <rafael at debian.org>
Date: Sun May 17 17:15:31 2009 +0200
Avoid warnings "deprecated conversion from string constant to 'char *'"
diff --git a/debian/changelog b/debian/changelog
index 56d583e..c237143 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ octave-graceplot (1.0.7-1) UNRELEASED; urgency=low
+ (Standards-Version): Bump to 3.8.1 (add file debian/README.source)
+ (Depends): Add ${misc:Depends}, octave-io, octave-general
+ (Vcs-Git, Vcs-Browser): Adjust to new Git repository
+ * debian/patches/const-char-pointers.diff: New patch to avoid warnings
+ "deprecated conversion from string constant to 'char *'"
-- Rafael Laboissiere <rafael at debian.org> Sun, 12 Apr 2009 17:51:00 +0200
diff --git a/debian/patches/const-char-pointers.diff b/debian/patches/const-char-pointers.diff
new file mode 100644
index 0000000..17f99c6
--- /dev/null
+++ b/debian/patches/const-char-pointers.diff
@@ -0,0 +1,62 @@
+Avoid warnings "deprecated conversion from string constant to 'char *'"
+
+ -- Rafael Laboissiere <rafael at debian.org> Sun, 17 May 2009 17:10:57 +0200
+
+--- a/src/__grcmd__.cc
++++ b/src/__grcmd__.cc
+@@ -164,14 +164,14 @@
+ return (left);
+ }
+
+-int gr_open_pipe(int fig, char *exe, int bs, ...)
++int gr_open_pipe(int fig, const char *exe, int bs, ...)
+ {
+ int i, fd[2];
+ int retval;
+ char fd_number[4];
+ va_list ap;
+- char **arglist;
+- char *s;
++ const char ** arglist;
++ const char *s;
+ int numarg;
+
+ Gracedata & g = graces[fig];
+@@ -221,23 +221,21 @@
+ /* build the argument list */
+ va_start(ap, bs);
+ numarg = 3;
+- arglist = (char **) malloc((numarg + 1) * sizeof(char *));
++ arglist = (const char **) malloc((numarg + 1) * sizeof(char *));
+ arglist[0] = exe;
+ arglist[1] = "-dpipe";
+ sprintf(fd_number, "%d", fd[0]);
+ arglist[2] = fd_number;
+- while ((s = va_arg(ap, char *)) != NULL) {
++ while ((s = va_arg(ap, const char *)) != NULL) {
+ numarg++;
+ arglist =
+- (char **) realloc(arglist, (numarg + 1) * sizeof(char *));
+- arglist[numarg - 1] =
+- (char *) malloc((strlen(s) + 1) * SIZEOF_CHAR);
+- strcpy(arglist[numarg - 1], s);
++ (const char **) realloc(arglist, (numarg + 1) * sizeof(char *));
++ arglist [numarg - 1] = s;
+ }
+ arglist[numarg] = NULL;
+ va_end(ap);
+
+- retval = execvp(exe, arglist);
++ retval = execvp(exe, (char * const *) arglist);
+
+ if (retval == -1) {
+ printf("grplot: Cannot start %s\n", exe);
+@@ -271,7 +269,7 @@
+ bool gr_is_open(int fig)
+ {
+ Gracedata & g = graces[fig];
+- char *teststr = " ";
++ const char *teststr = " ";
+ int written;
+
+ if (g.fd_pipe < 0)
diff --git a/debian/patches/series b/debian/patches/series
index bacbdde..7a7bae0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
autoload-yes.diff
no-toggle-in-pkg-add.diff
+const-char-pointers.diff
--
octave-graceplot
More information about the Pkg-octave-commit
mailing list