]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/libbfd.c
Fix compile time warning messages from gcc version 8 about cast between incompatible...
[thirdparty/binutils-gdb.git] / bfd / libbfd.c
index 6f29fe73a6f4a1a1a7cd3378a9b2e6c28c7bd739..a94de20785901d1d54ccfe60c63f31eb852c229a 100644 (file)
@@ -50,6 +50,15 @@ bfd_false (bfd *ignore ATTRIBUTE_UNUSED)
   return FALSE;
 }
 
+/* Like bfd_false, but accepts an arbitrary number of arguments.  */
+
+bfd_boolean
+bfd_false_any (bfd *ignore ATTRIBUTE_UNUSED, ...)
+{
+  bfd_set_error (bfd_error_invalid_operation);
+  return FALSE;
+}
+
 /* A routine which is used in target vectors for supported operations
    which do not actually do anything.  */
 
@@ -59,6 +68,14 @@ bfd_true (bfd *ignore ATTRIBUTE_UNUSED)
   return TRUE;
 }
 
+/* Like bfd_true, but accepts an arbitrary number of arguments.  */
+
+bfd_boolean
+bfd_true_any (bfd *ignore ATTRIBUTE_UNUSED, ...)
+{
+  return TRUE;
+}
+
 /* A routine which is used in target vectors for unsupported
    operations which return a pointer value.  */
 
@@ -69,24 +86,57 @@ bfd_nullvoidptr (bfd *ignore ATTRIBUTE_UNUSED)
   return NULL;
 }
 
+/* Like bfd_nullvoidptr, but accepts an arbitrary number of arguments.  */
+
+void *
+bfd_nullvoidptr_any (bfd *ignore ATTRIBUTE_UNUSED, ...)
+{
+  bfd_set_error (bfd_error_invalid_operation);
+  return NULL;
+}
+
 int
 bfd_0 (bfd *ignore ATTRIBUTE_UNUSED)
 {
   return 0;
 }
 
+/* Like bfd_0, but accepts an arbitrary number of arguments.  */
+
+int
+bfd_0_any (bfd *ignore ATTRIBUTE_UNUSED, ...)
+{
+  return 0;
+}
+
 unsigned int
 bfd_0u (bfd *ignore ATTRIBUTE_UNUSED)
 {
    return 0;
 }
 
+/* Like bfd_0u, but accepts an arbitrary number of arguments.  */
+
+unsigned int
+bfd_0u_any (bfd *ignore ATTRIBUTE_UNUSED, ...)
+{
+   return 0;
+}
+
 long
 bfd_0l (bfd *ignore ATTRIBUTE_UNUSED)
 {
   return 0;
 }
 
+/* Like bfd_0l, but accepts an arbitrary number of arguments.  */
+
+long
+bfd_0l_any (bfd *ignore ATTRIBUTE_UNUSED, ...)
+{
+  return 0;
+}
+
 /* A routine which is used in target vectors for unsupported
    operations which return -1 on error.  */
 
@@ -97,11 +147,27 @@ _bfd_n1 (bfd *ignore_abfd ATTRIBUTE_UNUSED)
   return -1;
 }
 
+/* Like bfd_n1, but accepts an arbitrary number of arguments.  */
+
+long
+_bfd_n1_any (bfd *ignore_abfd ATTRIBUTE_UNUSED, ...)
+{
+  bfd_set_error (bfd_error_invalid_operation);
+  return -1;
+}
+
 void
 bfd_void (bfd *ignore ATTRIBUTE_UNUSED)
 {
 }
 
+/* Like bfd_void, but accepts an arbitrary number of arguments.  */
+
+void
+bfd_void_any (bfd *ignore ATTRIBUTE_UNUSED, ...)
+{
+}
+
 long
 _bfd_norelocs_get_reloc_upper_bound (bfd *abfd ATTRIBUTE_UNUSED,
                                     asection *sec ATTRIBUTE_UNUSED)