Merge lp:~zyv/cuneiform-linux/uninitialized-vars into lp:cuneiform-linux

Proposed by Yury V. Zaytsev
Status: Merged
Merged at revision: 489
Proposed branch: lp:~zyv/cuneiform-linux/uninitialized-vars
Merge into: lp:cuneiform-linux
Diff against target: 30 lines (+7/-2)
2 files modified
cuneiform_src/Kern/cfcompat/cfcompat.c (+1/-1)
cuneiform_src/Kern/r35/src/r35.c (+6/-1)
To merge this branch: bzr merge lp:~zyv/cuneiform-linux/uninitialized-vars
Reviewer Review Type Date Requested Status
Jussi Pakkanen Pending
Review via email: mp+37460@code.launchpad.net

Description of the change

Oleg sent me a follow-up patch to fix some uninitialized variables for MSVC. I guess it would compile anyway if you force MSVC to ignore these warnings (i.e. not treat warnings as errors), but with the default warning level without this patch the compilation breaks.

It's up to you if you want to accept it or not, just wanted to bring this to your attention.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cuneiform_src/Kern/cfcompat/cfcompat.c'
2--- cuneiform_src/Kern/cfcompat/cfcompat.c 2009-09-19 21:19:02 +0000
3+++ cuneiform_src/Kern/cfcompat/cfcompat.c 2010-10-04 11:35:58 +0000
4@@ -511,7 +511,7 @@
5
6 const int len = strlen (tmpl);
7 char* x_tail = tmpl + len - 6;
8- LARGE_INTEGER rand_seed;
9+ LARGE_INTEGER rand_seed = {0, 0};
10 uint64_t value = rand_seed.QuadPart ^ GetCurrentThreadId();
11 unsigned int cnt = 0;
12
13
14=== modified file 'cuneiform_src/Kern/r35/src/r35.c'
15--- cuneiform_src/Kern/r35/src/r35.c 2009-09-19 15:08:05 +0000
16+++ cuneiform_src/Kern/r35/src/r35.c 2010-10-04 11:35:58 +0000
17@@ -728,7 +728,12 @@
18
19 Bool32 recog_cluster5x3(uint16_t Im3x5[], uchar let, VERSION *v)
20 {
21-int jold, jm, rm, res;
22+
23+int jold = 0;
24+int jm = 0;
25+int rm = 0;
26+int res = 0;
27+
28 elm3x5 *curr;
29
30 curr = &tab3x5 [ (jm=header3x5[ let ].numel) ];

Subscribers

People subscribed via source and target branches