summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-26 13:45:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-06-26 13:45:51 +0000
commit81b1d7eaf40d749b80f794d43bc6ab0f8fefc6b1 (patch)
tree19786fddd4eea1672b1b65ccf8e6a7dfc9a82634
parent9db38a4ba715fd86998b2fd66445eb27e8bb1d8e (diff)
downloadhyphen-81b1d7eaf40d749b80f794d43bc6ab0f8fefc6b1.tar.gz
clang scan-build warnings
-rw-r--r--ChangeLog3
-rw-r--r--hyphen.c2
-rw-r--r--substrings.c1
3 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index acb4bc0..22cd55e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2014-06-26 Caolán McNamara <caolán at redhat dot com>:
+ * clang scan-build warnings
+
2013-03-18 László Németh <nemeth at numbertext dot org>:
* Makefile.am, Makefile.in: set -version-info
diff --git a/hyphen.c b/hyphen.c
index 6d3b037..2c11c7b 100644
--- a/hyphen.c
+++ b/hyphen.c
@@ -360,7 +360,7 @@ void hnj_hyphen_load_line(char * buf, HyphenDict * dict, HashTab * hashtab) {
}
/* now, put in the prefix transitions */
- for (; found < 0 ;j--)
+ for (; found < 0 && j > 0; --j)
{
last_state = state_num;
ch = word[j - 1];
diff --git a/substrings.c b/substrings.c
index 2ba96df..6a5c880 100644
--- a/substrings.c
+++ b/substrings.c
@@ -200,7 +200,6 @@ int main(int argc, const char* argv[]) {
if (c<'0' || c>'9') pat[j++]=c;
}
pat[j]=0;
- p = patterns;
pattab_key[patterns] = pat;
pattab_val[patterns++] = org;
if (patterns>MAXPATHS) die("to many base patterns");