unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
Subject: Problem report #59
Date: Tue, 11 Apr 2006 08:49:16 -0700	[thread overview]
Message-ID: <200604111549.k3BFnGjC015117@scanner2.ics.uci.edu> (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

             reply	other threads:[~2006-04-11 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-11 15:49 Dan Nicolaescu [this message]
2006-04-11 17:15 ` Problem report #59 Stuart D. Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200604111549.k3BFnGjC015117@scanner2.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).