From: "Kei Sakamoto" <sakamoto.kei@renesas.com>
To: "Andrew Cagney" <ac131313@redhat.com>
Cc: <gdb-patches@sources.redhat.com>
Subject: Re: [PATCH] revised m32r target
Date: Mon, 28 Jul 2003 06:45:00 -0000 [thread overview]
Message-ID: <013d01c354d4$2c955550$5169910a@KEI> (raw)
In-Reply-To: <3F23FCC9.9040908@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1940 bytes --]
> Can you try configuring/building with:
>
> --enable-gdb-build-warnings=,-Werror
>
> (all targets should configure/build with that) I'm seeing the warnings:
>
> m32r-tdep.c: In function `m32r_store_return_value':
> m32r-tdep.c:289: warning: pointer of type `void *' used in arithmetic
> m32r-rom.c: In function `m32r_upload_command':
> m32r-rom.c:466: warning: `hostent' might be used uninitialized in this
> function
>
> Can you please try to reproduce / fix this.
I fixed them and attached a patch file.
2003-07-28 Kei Sakamoto <sakamoto.kei@renesas.com>
* m32r-rom.c (m32r_upload_command): Use hostent only when
gethostname succeeds, in order to avoid a compilation
warning.
* m32r-tdep.c (m32r_store_return_value): Add a cast to
remove a compiler warning.
> BTW, for the ChangeLog I checked in:
>
> 2003-07-27 Andrew Cagney <cagney@redhat.com>
>
> Patch from 2003-07-22 Kei Sakamoto <sakamoto.kei@renesas.com>:
> * m32r-tdep.c (m32r_memory_insert_breakpoint): Fix code style -
> operator at start and not end of line.
> (decode_prologue): Ditto.
> (m32r_frame_unwind_cache, m32r_unwind_sp, m32r_unwind_pc): Use
> frame_unwind_register_unsigned instead of
> frame_unwind_unsigned_register.
> (m32r_read_pc): Use regcache_cooked_read_unsigned instead of
> read_register.
> (m32r_push_dummy_call): Use register_size instead of
> REGISTER_RAW_SIZE.
> (m32r_frame_sniffer): Replace m32r_frame_p.
> (m32r_gdbarch_init): Call frame_unwind_append_sniffer.
> * m32r-rom.c (report_transfer_performance): Delete extern
> declaration.
> (m32r_load, m32r_upload_command): Use print_transfer_performance
> instead of report_transfer_performance.
> (_initialize_m32r_rom): Use add_setshow_cmd instead of add_set_cmd
> / add_show_from_set.
>
>
> as it better states what was changed.
Thank you. This is much better than mine.
===
Kei Sakamoto
Renesas Technology Corp.
sakamoto.kei@renesas.com
[-- Attachment #2: diffs --]
[-- Type: application/octet-stream, Size: 1328 bytes --]
diff -Naur src.orig/gdb/m32r-rom.c src/gdb/m32r-rom.c
--- src.orig/gdb/m32r-rom.c Mon Jul 28 00:38:16 2003
+++ src/gdb/m32r-rom.c Mon Jul 28 15:04:54 2003
@@ -492,16 +492,18 @@
buf[0] = 0;
gethostname (buf, sizeof (buf));
if (buf[0] != 0)
- hostent = gethostbyname (buf);
- if (hostent != 0)
{
+ hostent = gethostbyname (buf);
+ if (hostent != 0)
+ {
#if 1
- memcpy (&inet_addr.s_addr, hostent->h_addr,
- sizeof (inet_addr.s_addr));
- server_addr = (char *) inet_ntoa (inet_addr);
+ memcpy (&inet_addr.s_addr, hostent->h_addr,
+ sizeof (inet_addr.s_addr));
+ server_addr = (char *) inet_ntoa (inet_addr);
#else
- server_addr = (char *) inet_ntoa (hostent->h_addr);
+ server_addr = (char *) inet_ntoa (hostent->h_addr);
#endif
+ }
}
if (server_addr == 0) /* failed? */
error
diff -Naur src.orig/gdb/m32r-tdep.c src/gdb/m32r-tdep.c
--- src.orig/gdb/m32r-tdep.c Mon Jul 28 00:38:16 2003
+++ src/gdb/m32r-tdep.c Mon Jul 28 15:05:26 2003
@@ -286,7 +286,7 @@
if (len > 4)
{
- regval = extract_unsigned_integer (valbuf + 4, len - 4);
+ regval = extract_unsigned_integer ((char *) valbuf + 4, len - 4);
regcache_cooked_write_unsigned (regcache, RET1_REGNUM + 1, regval);
}
}
next prev parent reply other threads:[~2003-07-28 6:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-04 2:00 Kei Sakamoto
2003-07-11 7:15 ` Kei Sakamoto
2003-07-11 13:31 ` Andrew Cagney
2003-07-21 18:49 ` Andrew Cagney
2003-07-22 5:00 ` Kei Sakamoto
2003-07-27 16:24 ` Andrew Cagney
2003-07-28 6:45 ` Kei Sakamoto [this message]
2003-08-01 21:12 ` Andrew Cagney
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='013d01c354d4$2c955550$5169910a@KEI' \
--to=sakamoto.kei@renesas.com \
--cc=ac131313@redhat.com \
--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