From 782c112285467b906296b020f8fce3fb76cc5bb5 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Tue, 21 Jun 2016 13:26:11 +0200 Subject: [PATCH] S390 gdbserver: Mark local funcs/vars as static Compiling with '-Wmissing-declarations' yields warnings in linux-s390-low.c. To fix this, mark appropriate functions as static. gdb/gdbserver/ChangeLog: * linux-s390-low.c (s390_emit_eq_goto): Mark function static. (s390_emit_ne_goto): Likewise. (s390_emit_lt_goto): Likewise. (s390_emit_le_goto): Likewise. (s390_emit_gt_goto): Likewise. (s390_emit_ge_goto): Likewise. (s390x_emit_eq_goto): Likewise. (s390x_emit_ne_goto): Likewise. (s390x_emit_lt_goto): Likewise. (s390x_emit_le_goto): Likewise. (s390x_emit_gt_goto): Likewise. (s390x_emit_ge_goto): Likewise. (s390_emit_ops_impl): Mark variable static. (s390x_emit_ops): Likewise. --- gdb/gdbserver/ChangeLog | 17 +++++++++++++++++ gdb/gdbserver/linux-s390-low.c | 28 ++++++++++++++-------------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 6983e19a704..42090f5ca57 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,20 @@ +2016-06-21 Andreas Arnez + + * linux-s390-low.c (s390_emit_eq_goto): Mark function static. + (s390_emit_ne_goto): Likewise. + (s390_emit_lt_goto): Likewise. + (s390_emit_le_goto): Likewise. + (s390_emit_gt_goto): Likewise. + (s390_emit_ge_goto): Likewise. + (s390x_emit_eq_goto): Likewise. + (s390x_emit_ne_goto): Likewise. + (s390x_emit_lt_goto): Likewise. + (s390x_emit_le_goto): Likewise. + (s390x_emit_gt_goto): Likewise. + (s390x_emit_ge_goto): Likewise. + (s390_emit_ops_impl): Mark variable static. + (s390x_emit_ops): Likewise. + 2016-06-17 Yao Qi * linux-low.c (handle_extended_wait): Call diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c index f5a7d85f806..231b61476c5 100644 --- a/gdb/gdbserver/linux-s390-low.c +++ b/gdb/gdbserver/linux-s390-low.c @@ -1970,7 +1970,7 @@ s390_emit_void_call_2 (CORE_ADDR fn, int arg1) /* The "emit_eq_goto" emit_ops method for s390. */ -void +static void s390_emit_eq_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -1990,7 +1990,7 @@ s390_emit_eq_goto (int *offset_p, int *size_p) /* The "emit_ne_goto" emit_ops method for s390. */ -void +static void s390_emit_ne_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2010,7 +2010,7 @@ s390_emit_ne_goto (int *offset_p, int *size_p) /* The "emit_lt_goto" emit_ops method for s390. */ -void +static void s390_emit_lt_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2038,7 +2038,7 @@ s390_emit_lt_goto (int *offset_p, int *size_p) /* The "emit_le_goto" emit_ops method for s390. */ -void +static void s390_emit_le_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2066,7 +2066,7 @@ s390_emit_le_goto (int *offset_p, int *size_p) /* The "emit_gt_goto" emit_ops method for s390. */ -void +static void s390_emit_gt_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2094,7 +2094,7 @@ s390_emit_gt_goto (int *offset_p, int *size_p) /* The "emit_ge_goto" emit_ops method for s390. */ -void +static void s390_emit_ge_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2123,7 +2123,7 @@ s390_emit_ge_goto (int *offset_p, int *size_p) /* The "emit_ops" structure for s390. Named _impl to avoid name collision with s390_emit_ops function. */ -struct emit_ops s390_emit_ops_impl = +static struct emit_ops s390_emit_ops_impl = { s390_emit_prologue, s390_emit_epilogue, @@ -2580,7 +2580,7 @@ s390x_emit_void_call_2 (CORE_ADDR fn, int arg1) /* The "emit_eq_goto" emit_ops method for s390x. */ -void +static void s390x_emit_eq_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2598,7 +2598,7 @@ s390x_emit_eq_goto (int *offset_p, int *size_p) /* The "emit_ne_goto" emit_ops method for s390x. */ -void +static void s390x_emit_ne_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2616,7 +2616,7 @@ s390x_emit_ne_goto (int *offset_p, int *size_p) /* The "emit_lt_goto" emit_ops method for s390x. */ -void +static void s390x_emit_lt_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2634,7 +2634,7 @@ s390x_emit_lt_goto (int *offset_p, int *size_p) /* The "emit_le_goto" emit_ops method for s390x. */ -void +static void s390x_emit_le_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2652,7 +2652,7 @@ s390x_emit_le_goto (int *offset_p, int *size_p) /* The "emit_gt_goto" emit_ops method for s390x. */ -void +static void s390x_emit_gt_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2670,7 +2670,7 @@ s390x_emit_gt_goto (int *offset_p, int *size_p) /* The "emit_ge_goto" emit_ops method for s390x. */ -void +static void s390x_emit_ge_goto (int *offset_p, int *size_p) { static const unsigned char buf[] = { @@ -2688,7 +2688,7 @@ s390x_emit_ge_goto (int *offset_p, int *size_p) /* The "emit_ops" structure for s390x. */ -struct emit_ops s390x_emit_ops = +static struct emit_ops s390x_emit_ops = { s390x_emit_prologue, s390x_emit_epilogue, -- 2.30.2