diff options
author | Nicolas Hillegeer <nicolas@hillegeer.com> | 2014-02-27 18:57:17 +0100 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-02-28 11:48:43 -0300 |
commit | 3f29a02166878bdbf32b0d638aa0e0c9d83a73cc (patch) | |
tree | a1f932447c6a657fff86b1a9823f37db282f2801 /src/hangulin.c | |
parent | 6eece5895e4f0c147ef21ebb4d170a54f8694182 (diff) | |
download | rneovim-3f29a02166878bdbf32b0d638aa0e0c9d83a73cc.tar.gz rneovim-3f29a02166878bdbf32b0d638aa0e0c9d83a73cc.tar.bz2 rneovim-3f29a02166878bdbf32b0d638aa0e0c9d83a73cc.zip |
MAKE: ask gnulikes to warn and be pedantic + fixes
It seems clang 3.4 thinks the codebase is in fantastic shape and gcc 4.9.0
has only minor niggles, which I fixed:
- fix uninitialized member warning:
In DEBUG mode the expr member doesn't get properly initialized to NULL.
- fix warnings about directive inside of macro's:
On some platforms/compilers, sprintf is a macro. Putting macro directives
inside of a macro is unportable and gcc 4.9 warns about that.
- fix signed vs. unsigned comparison warning:
The in-memory table will luckily not even come close to the limits imposed
by ssize_t. If it ever reaches that, we've got bigger problems.
Diffstat (limited to 'src/hangulin.c')
-rw-r--r-- | src/hangulin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hangulin.c b/src/hangulin.c index 185bf0a5bd..f7619ef0b3 100644 --- a/src/hangulin.c +++ b/src/hangulin.c @@ -1407,9 +1407,9 @@ static void convert_ks_to_3(const char_u *src, int *fp, int *mp, int *lp) int low = *(src + 1); int c; int i; + const ssize_t tablesize = sizeof(ks_table1) / sizeof(ks_table1[0]); - if ((i = han_index(h, low)) >= 0 - && i < sizeof(ks_table1)/sizeof(ks_table1[0])) { + if ((i = han_index(h, low)) >= 0 && i < tablesize) { *fp = ks_table1[i][0]; *mp = ks_table1[i][1]; *lp = ks_table1[i][2]; |