delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2012/12/04/12:07:57

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:date:message-id:subject:from:to:content-type;
bh=Tpb4Htqy6s5E5gieV592ceN2kBsCoqwEmYyts+QC1SI=;
b=MMX2r/zPQ0Zdz6VgUV/IDr/q4nAbMG/HGpzVQYZedZHqzoBdzf8GLQKHX5sb6ep+lf
JbeJNDO034Alp6V6j99mGBD+zgtKw7WVcQ7FjnRVVQVRzuUon7IEfgJNqQlsG79ZIIHq
q/YBYliBBoNuv7cbzZChhYclB/0/bnFi5QOaokOMUUiMmy3i+VSz0xVW+Wlx6vRzrU7l
VPs/+iw/fkwofwbIquo1EOXrfHSOrQkXR4+vys4Nshbq0W7pjPHOFd5DkvZ1FnhNeimR
I5oC3OKQgtfz4gzYLbhxthLuPWGWXkibEhoWq7XK9K96Ae8t0Os3rdT5YP/KLcS7UGj/
J19Q==
MIME-Version: 1.0
Date: Tue, 4 Dec 2012 18:36:07 +0200
Message-ID: <CAA2C=vA8kNDh=c5jXJ1r0TxVPuvKz-QViG222j=oDghS-UxeLA@mail.gmail.com>
Subject: src/debug/fsdb/fullscr.c r1.12
From: Ozkan Sezer <sezeroz AT gmail DOT com>
To: djgpp-workers <djgpp-workers AT delorie DOT com>
Reply-To: djgpp-workers AT delorie DOT com

Hi:

As far as I can see unassemble_proper() sets its len param, however
src/debug/fsdb/fullscr.c r1.12 comments out the call to avoid set-but-
unused warnings but 'len' is used two lines below.  So, unless I am
missing something, the following is needed.

Regards

--
O.S.

Index: src/debug/fsdb/fullscr.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/debug/fsdb/fullscr.c,v
retrieving revision 1.12
diff -u -p -r1.12 fullscr.c
--- src/debug/fsdb/fullscr.c	1 Dec 2012 04:29:46 -0000	1.12
+++ src/debug/fsdb/fullscr.c	4 Dec 2012 16:29:59 -0000
@@ -857,7 +857,7 @@ static int
 code_skip (int origin, int count)
 {
   int len, *next, i, j, k, instcount, done, leave;
-  char *state, *source /* , *inst */;
+  char *state, *source, *inst;

   if (count >= 0)
     {
@@ -889,9 +889,8 @@ code_skip (int origin, int count)
 	      j = origin - done;
 	      if (valid_instaddr (j))
 		{
-#if 0
 		  inst = unassemble_proper (j, &len);
-#endif
+		  (void) inst; /* set, but not used. */
 		  source = unassemble_source (j);
 		  next[done] = j + len;
 		  if (source)
@@ -909,8 +908,10 @@ code_skip (int origin, int count)
 			  leave = (strncmp (inst, "jmp", 3) == 0
 				   || strncmp (inst, "ret", 3) == 0
 				   || strncmp (inst, "iret", 4) == 0);
-			  if (!leave)
+			  if (!leave) {
 			    inst = unassemble_proper (j, &len);
+			    (void) inst; /* set, but not used. */
+			  }
 #endif
 			}
 		    }

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019