* Problem report #118: base/src/emacs/src/charset.c (load_charset_map); UNINIT
@ 2008-12-03 1:18 Dan Nicolaescu
2008-12-03 5:42 ` Kenichi Handa
0 siblings, 1 reply; 2+ messages in thread
From: Dan Nicolaescu @ 2008-12-03 1:18 UTC (permalink / raw)
To: emacs-devel
CID: 118
Checker: UNINIT (help)
File: base/src/emacs/src/charset.c
Function: load_charset_map
Description: Using uninitialized value "table" in call to function
"char_table_ref"
Event var_decl: Declared variable "table" without initializer
Also see events: [uninit_use_in_call][uninit_use_in_call]
203 Lisp_Object vec, table;
204 unsigned max_code = CHARSET_MAX_CODE (charset);
205 int ascii_compatible_p = charset->ascii_compatible_p;
206 int min_char, max_char, nonascii_min_char;
207 int i;
208 unsigned char *fast_map = charset->fast_map;
209
At conditional (1): "n_entries <= 0" taking false path
210 if (n_entries <= 0)
211 return;
212
At conditional (2): "control_flag > 0" taking false path
213 if (control_flag > 0)
214 {
215 int n = CODE_POINT_TO_INDEX (charset, max_code) + 1;
216
217 table = Fmake_char_table (Qnil, Qnil);
218 if (control_flag == 1)
219 vec = Fmake_vector (make_number (n), make_number (-1));
220 else if (! CHAR_TABLE_P (Vchar_unify_table))
221 Vchar_unify_table = Fmake_char_table (Qnil, Qnil);
222
223 charset_map_loaded = 1;
224 }
225
226 min_char = max_char = entries->entry[0].c;
227 nonascii_min_char = MAX_CHAR;
At conditional (3): "i < n_entries" taking true path
228 for (i = 0; i < n_entries; i++)
229 {
230 unsigned from, to;
231 int from_index, to_index;
232 int from_c, to_c;
233 int idx = i % 0x10000;
234
At conditional (4): "i > 0" taking false path
235 if (i > 0 && idx == 0)
236 entries = entries->next;
237 from = entries->entry[idx].from;
238 to = entries->entry[idx].to;
239 from_c = entries->entry[idx].c;
At conditional (5): "(charset)->code_linear_p != 0" taking true path
240 from_index = CODE_POINT_TO_INDEX (charset, from);
At conditional (6): "from == to" taking true path
241 if (from == to)
242 {
243 to_index = from_index;
244 to_c = from_c;
245 }
246 else
247 {
248 to_index = CODE_POINT_TO_INDEX (charset, to);
249 to_c = from_c + (to_index - from_index);
250 }
At conditional (7): "from_index < 0" taking false path
At conditional (8): "to_index < 0" taking false path
251 if (from_index < 0 || to_index < 0)
252 continue;
253
At conditional (9): "control_flag < 2" taking true path
254 if (control_flag < 2)
255 {
256 int c;
257
At conditional (10): "to_c > max_char" taking true path
258 if (to_c > max_char)
259 max_char = to_c;
260 else if (from_c < min_char)
261 min_char = from_c;
At conditional (11): "ascii_compatible_p != 0" taking true path
262 if (ascii_compatible_p)
263 {
At conditional (12): "from_c >= 128" taking true path
264 if (! ASCII_BYTE_P (from_c))
265 {
At conditional (13): "from_c < nonascii_min_char" taking true path
266 if (from_c < nonascii_min_char)
267 nonascii_min_char = from_c;
268 }
269 else if (! ASCII_BYTE_P (to_c))
270 {
271 nonascii_min_char = 0x80;
272 }
273 }
274
At conditional (14): "c <= to_c" taking true path
At conditional (17): "c <= to_c" taking false path
275 for (c = from_c; c <= to_c; c++)
At conditional (15): "c < 65536" taking true path
At conditional (16): "0" taking false path
276 CHARSET_FAST_MAP_SET (c, fast_map);
277
At conditional (18): "control_flag == 1" taking true path
278 if (control_flag == 1)
279 {
280 unsigned code = from;
281
At conditional (19): "(charset)->compact_codes_p != 0" taking true path
282 if (CHARSET_COMPACT_CODES_P (charset))
At conditional (20): "1" taking true path
283 while (1)
284 {
285 ASET (vec, from_index, make_number (from_c));
Event uninit_use_in_call: Using uninitialized value "table" in call to function "char_table_ref" [model]
Also see events: [var_decl][uninit_use_in_call]
At conditional (21): "from_c < 128" taking false path
286 if (NILP (CHAR_TABLE_REF (table, from_c)))
287 CHAR_TABLE_SET (table, from_c, make_number (code));
288 if (from_index == to_index)
289 break;
290 from_index++, from_c++;
291 code = INDEX_TO_CODE_POINT (charset, from_index);
292 }
293 else
294 for (; from_index <= to_index; from_index++, from_c++)
295 {
296 ASET (vec, from_index, make_number (from_c));
Event uninit_use_in_call: Using uninitialized value "table" in call to function "char_table_ref" [model]
Also see events: [var_decl][uninit_use_in_call]
297 if (NILP (CHAR_TABLE_REF (table, from_c)))
298 CHAR_TABLE_SET (table, from_c, make_number (from_index));
299 }
300 }
301 }
302 else
303
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-03 5:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 1:18 Problem report #118: base/src/emacs/src/charset.c (load_charset_map); UNINIT Dan Nicolaescu
2008-12-03 5:42 ` Kenichi Handa
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).