From: David Kastrup Date: Sun, 4 Dec 2011 19:04:56 +0000 (+0100) Subject: Issue 2036: keep make test in flower from warnings X-Git-Tag: release/2.15.22-1~34 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c9d7db6a073f3824e6d2fd4e87ddd6519abe8c1d;p=lilypond.git Issue 2036: keep make test in flower from warnings --- 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);