[6/6] Remove fatal function and prototype

Message ID 1407340688-13721-7-git-send-email-gbenson@redhat.com
State Committed
Headers

Commit Message

Gary Benson Aug. 6, 2014, 3:58 p.m. UTC
  This commit removes the now-unused fatal function and prototype.

gdb/gdbserver/
2014-08-06  Gary Benson  <gbenson@redhat.com>

	* utils.h (fatal): Remove declaration.
	* utils.c (fatal): Remove function.
---
 gdb/gdbserver/ChangeLog |    5 +++++
 gdb/gdbserver/utils.c   |   17 -----------------
 gdb/gdbserver/utils.h   |    1 -
 3 files changed, 5 insertions(+), 18 deletions(-)
  

Comments

Pedro Alves Aug. 20, 2014, 4:25 p.m. UTC | #1
On 08/06/2014 04:58 PM, Gary Benson wrote:
> This commit removes the now-unused fatal function and prototype.
> 
> gdb/gdbserver/
> 2014-08-06  Gary Benson  <gbenson@redhat.com>
> 
> 	* utils.h (fatal): Remove declaration.
> 	* utils.c (fatal): Remove function.

OK.

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c
index 2d0b331..aff95ad 100644
--- a/gdb/gdbserver/utils.c
+++ b/gdb/gdbserver/utils.c
@@ -99,23 +99,6 @@  error (const char *string,...)
 #endif
 }
 
-/* Print an error message and exit reporting failure.
-   This is for a error that we cannot continue from.
-   STRING and ARG are passed to fprintf.  */
-
-/* VARARGS */
-void
-fatal (const char *string,...)
-{
-  va_list args;
-  va_start (args, string);
-  fprintf (stderr, PREFIX);
-  vfprintf (stderr, string, args);
-  fprintf (stderr, "\n");
-  va_end (args);
-  exit (1);
-}
-
 /* VARARGS */
 void
 warning (const char *string,...)
diff --git a/gdb/gdbserver/utils.h b/gdb/gdbserver/utils.h
index 906924b..447a464 100644
--- a/gdb/gdbserver/utils.h
+++ b/gdb/gdbserver/utils.h
@@ -23,7 +23,6 @@ 
 
 void perror_with_name (const char *string) ATTRIBUTE_NORETURN;
 void error (const char *string,...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
-void fatal (const char *string,...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
 void warning (const char *string,...) ATTRIBUTE_PRINTF (1, 2);
 char *paddress (CORE_ADDR addr);
 char *pfildes (gdb_fildes_t fd);