unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problem report #59
@ 2006-04-11 15:49 Dan Nicolaescu
  2006-04-11 17:15 ` Stuart D. Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Nicolaescu @ 2006-04-11 15:49 UTC (permalink / raw)



CID: 59
Checker: UNINIT (help)
File: emacs/src/editfns.c
Function: Ftranslate_region_internal
Description: Using uninitialized value "str_len"

2883 	  cnt = 0;
2884 	  for (; pos < end_pos; )
2885 	    {

At conditional (1): "pos_byte >= ((current_buffer)->text)->gpt_byte" taking true path

2886 	      register unsigned char *p = BYTE_POS_ADDR (pos_byte);
2887 	      unsigned char *str, buf[MAX_MULTIBYTE_LENGTH];

Event var_decl: Declared variable "str_len" without initializer
Also see events: [uninit_use]

2888 	      int len, str_len;
2889 	      int oc;
2890 	

At conditional (2): "multibyte != 0" taking true path

2891 	      if (multibyte)

At conditional (3): "*p < 128" taking true path
At conditional (4): "((*p < 128) ? 1 : (bytes_by_char_head[*p])) == 1" taking true path

2892 		oc = STRING_CHAR_AND_LENGTH (p, MAX_MULTIBYTE_LENGTH, len);
2893 	      else
2894 		oc = *p, len = 1;

At conditional (5): "oc < size" taking true path

2895 	      if (oc < size)
2896 		{

At conditional (6): "tt != 0" taking false path

2897 		  if (tt)
2898 		    {
2899 		      /* Reload as signal_after_change in last iteration may GC.  */
2900 		      tt = SDATA (table);
2901 		      if (string_multibyte)
2902 			{
2903 			  str = tt + string_char_to_byte (table, oc);
2904 			  nc = STRING_CHAR_AND_LENGTH (str, MAX_MULTIBYTE_LENGTH,
2905 						       str_len);
2906 			}
2907 		      else
2908 			{
2909 			  nc = tt[oc];
2910 			  if (! ASCII_BYTE_P (nc) && multibyte)
2911 			    {
2912 			      str_len = CHAR_STRING (nc, buf);
2913 			      str = buf;
2914 			    }
2915 			  else
2916 			    {
2917 			      str_len = 1;
2918 			      str = tt + oc;
2919 			    }
2920 			}
2921 		    }
2922 		  else
2923 		    {
2924 		      Lisp_Object val;
2925 		      int c;
2926 	
2927 		      nc = oc;

At conditional (7): "oc >= 0" taking true path
At conditional (8): "oc < 256" taking true path
At conditional (9): "(table & -8)->contents[oc] != Qnil" taking true path

2928 		      val = CHAR_TABLE_REF (table, oc);

At conditional (10): "val & 7 == 0" taking true path
At conditional (11): "c >= 0" taking true path
At conditional (12): "c & 255 == c" taking false path
At conditional (13): "char_valid_p != 0" taking false path

2929 		      if (INTEGERP (val)
2930 			  && (c = XINT (val), CHAR_VALID_P (c, 0)))
2931 			{
2932 			  nc = c;
2933 			  str_len = CHAR_STRING (nc, buf);
2934 			  str = buf;
2935 			}
2936 		    }
2937 	

At conditional (14): "nc != oc" taking true path

2938 		  if (nc != oc)
2939 		    {

Event uninit_use: Using uninitialized value "str_len"
Also see events: [var_decl]

2940 		      if (len != str_len)
2941 			{
2942 			  Lisp_Object string;
2943 	
2944 			  /* This is less efficient, because it moves the gap,
2945 			     but it should multibyte characters correctly.  */
2946 			  string = make_multibyte_string (str, 1, str_len);
29

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-11 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11 15:49 Problem report #59 Dan Nicolaescu
2006-04-11 17:15 ` Stuart D. Herring

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).