Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@ericsson.com>
Subject: [PATCH 3/3] record-full: Remove unused function netorder16
Date: Sun, 25 Jun 2017 17:45:00 -0000	[thread overview]
Message-ID: <1498412703-24303-4-git-send-email-simon.marchi@ericsson.com> (raw)
In-Reply-To: <1498412703-24303-1-git-send-email-simon.marchi@ericsson.com>

clang shows this warning:

  /home/emaisin/src/binutils-gdb/gdb/record-full.c:2344:1: error: unused function 'netorder16' [-Werror,-Wunused-function]
  netorder16 (uint16_t input)
  ^

Remove this function, which, AFAIK, has never been used.  Note that GCC
doesn't warn about this, because the function is marked as inline.
According to gcc's man page, it should ideed not warn:

  -Wunused-function
    Warn whenever a static function is declared but not defined or a non-inline static function is unused.  This warning is enabled by -Wall.

So it's probably not a GCC bug that it doesn't find this unused function, but a
different definition of "unused".

gdb/ChangeLog:

	* record-full.c (netorder16): Remove.
---
 gdb/record-full.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/gdb/record-full.c b/gdb/record-full.c
index 8e774a2..7f6ecc7 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -2340,16 +2340,6 @@ netorder32 (uint32_t input)
   return ret;
 }
 
-static inline uint16_t
-netorder16 (uint16_t input)
-{
-  uint16_t ret;
-
-  store_unsigned_integer ((gdb_byte *) &ret, sizeof (ret), 
-			  BFD_ENDIAN_BIG, input);
-  return ret;
-}
-
 /* Restore the execution log from a core_bfd file.  */
 static void
 record_full_restore (void)
-- 
2.7.4


  parent reply	other threads:[~2017-06-25 17:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-25 17:45 [PATCH 0/3] Third series towards a warning-less clang build Simon Marchi
2017-06-25 17:45 ` [PATCH 1/3] ada-lex: Ignore warnings about register keyword Simon Marchi
2017-06-26 13:13   ` Pedro Alves
2017-06-26 13:39     ` Simon Marchi
2017-06-26 14:54     ` [pushed] " Simon Marchi
2017-06-25 17:45 ` [PATCH 2/3] vec: Silence -Wunused-function warnings on clang Simon Marchi
2017-06-26  9:28   ` Pedro Alves
2017-06-26 12:28     ` Simon Marchi
2017-06-26 12:47       ` Pedro Alves
2017-06-26 12:52         ` Simon Marchi
     [not found]     ` <1498481156-10705-1-git-send-email-simon.marchi@ericsson.com>
2017-06-26 13:03       ` [PATCH 2/3 v2] " Pedro Alves
2017-06-25 17:45 ` Simon Marchi [this message]
2017-06-26 10:43   ` [PATCH 3/3] record-full: Remove unused function netorder16 Yao Qi
2017-06-26 14:54     ` Simon Marchi

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=1498412703-24303-4-git-send-email-simon.marchi@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=gdb-patches@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox