Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@is.elta.co.il>
To: gdb-patches@sources.redhat.com
Subject: [RFA] Avoid compiler warnings in mips-tdep.c
Date: Thu, 17 May 2001 07:53:00 -0000	[thread overview]
Message-ID: <Pine.SUN.3.91.1010517175343.14151F-100000@is> (raw)

Please consider the following patches to mips-tdep.c, to avoid compiler 
warnings and fix one typo in a comment.


2001-05-17  Eli Zaretskii  <eliz@is.elta.co.il>

	* mips-tdep.c (show_mipsfpu_command): Remove unused variable msg.
	(mips_set_processor_type_command): Remove unused variable j.
	(mips_breakpoint_from_pc): Declare breakpoint instruction
	sequences as unsigned char, to avoid compiler warnings.


--- gdb/mips-tdep.c~0	Wed Mar 28 23:42:31 2001
+++ gdb/mips-tdep.c	Tue May 15 15:30:39 2001
@@ -2193,8 +2193,8 @@
          don't use float registers for arguments.  This duplication of
          arguments in general registers can't hurt non-MIPS16 functions
          because those registers are normally skipped.  */
-      /* MIPS_EABI squeeses a struct that contains a single floating
-         point value into an FP register instead of pusing it onto the
+      /* MIPS_EABI squeezes a struct that contains a single floating
+         point value into an FP register instead of pushing it onto the
          stack. */
       if (fp_register_arg_p (typecode, arg_type)
 	  && float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
@@ -3279,7 +3279,6 @@
 static void
 show_mipsfpu_command (char *args, int from_tty)
 {
-  char *msg;
   char *fpu;
   switch (MIPS_FPU_TYPE)
     {
@@ -3387,7 +3386,7 @@
 int
 mips_set_processor_type (char *str)
 {
-  int i, j;
+  int i;
 
   if (str == NULL)
     return 0;
@@ -3493,7 +3492,8 @@
     {
       if (pc_is_mips16 (*pcptr))
 	{
-	  static char mips16_big_breakpoint[] = MIPS16_BIG_BREAKPOINT;
+	  static unsigned char mips16_big_breakpoint[] =
+	    MIPS16_BIG_BREAKPOINT;
 	  *pcptr = UNMAKE_MIPS16_ADDR (*pcptr);
 	  *lenptr = sizeof (mips16_big_breakpoint);
 	  return mips16_big_breakpoint;
@@ -3500,9 +3500,9 @@
 	}
       else
 	{
-	  static char big_breakpoint[] = BIG_BREAKPOINT;
-	  static char pmon_big_breakpoint[] = PMON_BIG_BREAKPOINT;
-	  static char idt_big_breakpoint[] = IDT_BIG_BREAKPOINT;
+	  static unsigned char big_breakpoint[] = BIG_BREAKPOINT;
+	  static unsigned char pmon_big_breakpoint[] = PMON_BIG_BREAKPOINT;
+	  static unsigned char idt_big_breakpoint[] = IDT_BIG_BREAKPOINT;
 
 	  *lenptr = sizeof (big_breakpoint);
 
@@ -3520,7 +3520,8 @@
     {
       if (pc_is_mips16 (*pcptr))
 	{
-	  static char mips16_little_breakpoint[] = MIPS16_LITTLE_BREAKPOINT;
+	  static unsigned char mips16_little_breakpoint[] =
+	    MIPS16_LITTLE_BREAKPOINT;
 	  *pcptr = UNMAKE_MIPS16_ADDR (*pcptr);
 	  *lenptr = sizeof (mips16_little_breakpoint);
 	  return mips16_little_breakpoint;
@@ -3527,9 +3528,11 @@
 	}
       else
 	{
-	  static char little_breakpoint[] = LITTLE_BREAKPOINT;
-	  static char pmon_little_breakpoint[] = PMON_LITTLE_BREAKPOINT;
-	  static char idt_little_breakpoint[] = IDT_LITTLE_BREAKPOINT;
+	  static unsigned char little_breakpoint[] = LITTLE_BREAKPOINT;
+	  static unsigned char pmon_little_breakpoint[] =
+	    PMON_LITTLE_BREAKPOINT;
+	  static unsigned char idt_little_breakpoint[] =
+	    IDT_LITTLE_BREAKPOINT;
 
 	  *lenptr = sizeof (little_breakpoint);
 


             reply	other threads:[~2001-05-17  7:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-17  7:53 Eli Zaretskii [this message]
2001-05-17 20:51 ` Andrew Cagney
2001-06-04  0:53   ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=Pine.SUN.3.91.1010517175343.14151F-100000@is \
    --to=eliz@is.elta.co.il \
    --cc=gdb-patches@sources.redhat.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox