From c9d7db6a073f3824e6d2fd4e87ddd6519abe8c1d Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 4 Dec 2011 20:04:56 +0100 Subject: [PATCH] Issue 2036: keep make test in flower from warnings --- flower/include/yaffut.hh | 4 ++-- flower/test-file-path.cc | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/flower/include/yaffut.hh b/flower/include/yaffut.hh index cf444626d9..0da01807d4 100644 --- a/flower/include/yaffut.hh +++ b/flower/include/yaffut.hh @@ -278,7 +278,7 @@ struct Test: public ITest, public virtual Suite Test (): Suite () { Registrator* r = &s_Registrator; - r = 0; + (void)r; } template void assert_throw (void (T::*mf) (), const char *at) @@ -302,7 +302,7 @@ struct Test: public ITest Test () { Registrator* r = &s_Registrator; - r = 0; + (void)r; } template void assert_throw (void (T::*mf) (), const char *at) diff --git a/flower/test-file-path.cc b/flower/test-file-path.cc index fb2f3f2f65..37ff3277ec 100644 --- a/flower/test-file-path.cc +++ b/flower/test-file-path.cc @@ -10,7 +10,10 @@ TEST (File_path, Find) char const *extensions[] = {"ly", "", 0}; string file = "init"; char cwd[PATH_MAX]; - getcwd (cwd, PATH_MAX); + if (!getcwd (cwd, PATH_MAX)) { + cerr << "Could not get current work directory\n"; + exit (1); + } string ly_dir = string (getenv ("top-src-dir")) + "/ly"; parse_path (string (1, PATHSEP) + ly_dir); string file_name = find (file, extensions); -- 2.39.2