aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-06-07 17:23:42 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-06-08 20:04:33 +0100
commit42d77edce1b4d49fed11fc79576ebe359f9b5f7f (patch)
tree72726362ef76de5d156f8317ed32e5bc13766d97
parentdeb70aa0322c4c43b68fa859b52a0ccf2d904b0f (diff)
downloadbinutils-42d77edce1b4d49fed11fc79576ebe359f9b5f7f.zip
binutils-42d77edce1b4d49fed11fc79576ebe359f9b5f7f.tar.gz
binutils-42d77edce1b4d49fed11fc79576ebe359f9b5f7f.tar.bz2
gdb: make throw_perror_with_name static
The throw_perror_with_name function is not used outside of utils.c right now. And as perror_with_name is just a wrapper around throw_perror_with_name, then any future calls would be to perror_with_name. Lets make throw_perror_with_name static. There should be no user visible changes after this commit.
-rw-r--r--gdb/utils.c2
-rw-r--r--gdb/utils.h3
2 files changed, 1 insertions, 4 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index f9dc4f2..413a4f4 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -623,7 +623,7 @@ perror_string (const char *prefix)
as the file name for which the error was encountered. Use ERRCODE
for the thrown exception. Then return to command level. */
-void
+static void ATTRIBUTE_NORETURN
throw_perror_with_name (enum errors errcode, const char *string)
{
std::string combined = perror_string (string);
diff --git a/gdb/utils.h b/gdb/utils.h
index 7e20285..d2acf89 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -296,9 +296,6 @@ extern CORE_ADDR string_to_core_addr (const char *my_string);
extern void fprintf_symbol (struct ui_file *, const char *,
enum language, int);
-extern void throw_perror_with_name (enum errors errcode, const char *string)
- ATTRIBUTE_NORETURN;
-
extern void perror_warning_with_name (const char *string);
extern void print_sys_errmsg (const char *, int);