mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
gdb.base/fileio.exp: Remove nowarnings
... and quiet -Wnonnull in a different way. gdb/testsuite/ChangeLog: 2017-05-18 Pedro Alves <palves@redhat.com> * gdb.base/fileio.c (null_str): New global. (test_stat): Use it. * gdb.base/fileio.exp: Remove nowarnings.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2017-05-18 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* gdb.base/fileio.c (null_str): New global.
|
||||||
|
(test_stat): Use it.
|
||||||
|
* gdb.base/fileio.exp: Remove nowarnings.
|
||||||
|
|
||||||
2017-05-17 Yao Qi <yao.qi@linaro.org>
|
2017-05-17 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* gdb.base/fileio.exp: Pass nowarnings to gdb_compile.
|
* gdb.base/fileio.exp: Pass nowarnings to gdb_compile.
|
||||||
|
@ -76,6 +76,10 @@ static const char *strerrno (int err);
|
|||||||
|
|
||||||
static void stop () {}
|
static void stop () {}
|
||||||
|
|
||||||
|
/* A NULL string. We pass this to stat below instead of a NULL
|
||||||
|
literal to avoid -Wnonnull warnings. */
|
||||||
|
const char *null_str;
|
||||||
|
|
||||||
int
|
int
|
||||||
test_open ()
|
test_open ()
|
||||||
{
|
{
|
||||||
@ -294,7 +298,7 @@ test_stat ()
|
|||||||
stop ();
|
stop ();
|
||||||
/* NULL pathname */
|
/* NULL pathname */
|
||||||
errno = 0;
|
errno = 0;
|
||||||
ret = stat (NULL, &st);
|
ret = stat (null_str, &st);
|
||||||
printf ("stat 2: ret = %d, errno = %d %s\n", ret, errno,
|
printf ("stat 2: ret = %d, errno = %d %s\n", ret, errno,
|
||||||
strerrno (errno));
|
strerrno (errno));
|
||||||
stop ();
|
stop ();
|
||||||
|
@ -31,7 +31,7 @@ if {[is_remote host]} {
|
|||||||
|
|
||||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||||
executable \
|
executable \
|
||||||
[list debug nowarnings "additional_flags=-DOUTDIR=\"$outdir/\""]] != "" } {
|
[list debug "additional_flags=-DOUTDIR=\"$outdir/\""]] != "" } {
|
||||||
untested "failed to compile"
|
untested "failed to compile"
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user