summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-12-03 23:02:24 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-12-03 23:02:24 +0200
commit808698b6a4cb7bbbb88e1892fd9c4155119b30f5 (patch)
treefb4f2d1f4aa5fc4d618f71f8e3f1f62b5b7444e6
parent7652a61744fb76a1b2dad94917c707fae62e9601 (diff)
downloadgawk-808698b6a4cb7bbbb88e1892fd9c4155119b30f5.tar.gz
Some minimal changes so it will compile.
-rw-r--r--ChangeLog8
-rw-r--r--bisonfix.awk4
-rw-r--r--builtin.c2
-rw-r--r--ext.c1
-rw-r--r--node.c2
-rw-r--r--regex_internal.c7
6 files changed, 15 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b0681e7..189af833 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Mon Dec 3 22:55:23 2012 Arnold D. Robbins <arnold@skeeve.com>
+
+ Minimal update to the branch.
+
+ * bisonfix.awk: Fixed to work.
+ * builtin.c, ext.c, node.c, regex_internal.c: Fix compiler
+ warnings from current GCC.
+
Mon Nov 8 22:29:35 2010 Arnold D. Robbins <arnold@skeeve.com>
* bootstrap.sh: Remove touch of libsigsegv/* files, since
diff --git a/bisonfix.awk b/bisonfix.awk
index ba071ef4..dd2a0778 100644
--- a/bisonfix.awk
+++ b/bisonfix.awk
@@ -19,6 +19,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+BEGIN { sfile = ARGV[1] ; delete ARGV[1] }
+
/^#if \(! defined \(yyoverflow\) \\/ {
line = $0
sub(/\\$/, "", line)
@@ -31,6 +33,6 @@
next
}
-/^#line.*y\.tab\.c/ { sub(/y.tab.c/, "awkgram.c") }
+/^#line.*y\.tab\.c/ { sub(/y.tab.c/, (sfile ".c")) }
{ print }
diff --git a/builtin.c b/builtin.c
index 3e0c347a..618a2895 100644
--- a/builtin.c
+++ b/builtin.c
@@ -794,7 +794,7 @@ check_pos:
msg = _("field width and precision are ignored for `%%%%' specifier");
if (msg != NULL)
- lintwarn(msg);
+ lintwarn("%s", msg);
}
bchunk_one("%");
s0 = s1;
diff --git a/ext.c b/ext.c
index aee01a3d..2357007a 100644
--- a/ext.c
+++ b/ext.c
@@ -55,6 +55,7 @@ do_ext(NODE *tree)
AWKNUM junk;
junk = (AWKNUM) dummy;
+ (void) junk;
#endif
if (do_lint && ! warned) {
diff --git a/node.c b/node.c
index f8425556..2200fb1e 100644
--- a/node.c
+++ b/node.c
@@ -886,6 +886,7 @@ free_wstr(NODE *n)
n->flags &= ~WSTRCUR;
}
+#if 0
static void
dump_wstr(FILE *fp, const wchar_t *str, size_t len)
{
@@ -895,6 +896,7 @@ dump_wstr(FILE *fp, const wchar_t *str, size_t len)
for (; len--; str++)
putwc(*str, fp);
}
+#endif
/* wstrstr --- walk haystack, looking for needle, wide char version */
diff --git a/regex_internal.c b/regex_internal.c
index 193854cf..397fba06 100644
--- a/regex_internal.c
+++ b/regex_internal.c
@@ -738,15 +738,8 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
mbstate_t cur_state;
wchar_t wc2;
int mlen = raw + pstr->len - p;
- unsigned char buf[6];
size_t mbclen;
- if (BE (pstr->trans != NULL, 0))
- {
- int i = mlen < 6 ? mlen : 6;
- while (--i >= 0)
- buf[i] = pstr->trans[p[i]];
- }
/* XXX Don't use mbrtowc, we know which conversion
to use (UTF-8 -> UCS4). */
memset (&cur_state, 0, sizeof (cur_state));