aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--array.c4
-rw-r--r--awklib/eg/prog/anagram.awk2
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ed2922f1..ea26be07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon May 9 16:30:49 2011 Arnold D. Robbins <arnold@skeeve.com>
+
+ * array.c (sort_up_value_type): Remove unused variable ret.
+ (do_delete): Initialize local variables to silence warnings.
+ Thanks to Michal Jaegermann.
+
Mon May 9 15:07:29 2011 Corinna Vinschen <vinschen@redhat.com>
* awk.h: Remove cygwin code for libsigsegv.
diff --git a/array.c b/array.c
index 5cf75d27..84b9a913 100644
--- a/array.c
+++ b/array.c
@@ -666,11 +666,12 @@ local_array:
void
do_delete(NODE *symbol, int nsubs)
{
- unsigned long hash1;
+ unsigned long hash1 = 0;
NODE *subs, *bucket, *last, *r;
int i;
assert(symbol->type == Node_var_array);
+ subs = bucket = last = r = NULL; /* silence the compiler */
/*
* The force_string() call is needed to make sure that
@@ -1446,7 +1447,6 @@ sort_up_value_type(const void *p1, const void *p2)
{
const NODE *t1, *t2;
NODE *n1, *n2;
- int ret;
/* we're passed a pair of index (array subscript) nodes */
t1 = *(const NODE *const *) p1;
diff --git a/awklib/eg/prog/anagram.awk b/awklib/eg/prog/anagram.awk
index 550e9580..7ca14559 100644
--- a/awklib/eg/prog/anagram.awk
+++ b/awklib/eg/prog/anagram.awk
@@ -6,7 +6,7 @@
# This program requires gawk 4.0 or newer.
# Required gawk-specific features:
# - True multidimensional arrays
-# - split() with "" as separater splits out individual characters
+# - split() with "" as separator splits out individual characters
# - asort() and asorti() functions
#
# See http://savannah.gnu.org/projects/gawk.