Revision: 71797 http://sourceforge.net/p/brlcad/code/71797 Author: starseeker Date: 2018-09-24 18:05:25 +0000 (Mon, 24 Sep 2018) Log Message: ----------- Don't ignore the return value of getcwd, makes warn_unused_result flag unhappy when building Release with gcc
Modified Paths: -------------- brlcad/trunk/src/libbu/tests/dir.c Modified: brlcad/trunk/src/libbu/tests/dir.c =================================================================== --- brlcad/trunk/src/libbu/tests/dir.c 2018-09-24 07:41:43 UTC (rev 71796) +++ brlcad/trunk/src/libbu/tests/dir.c 2018-09-24 18:05:25 UTC (rev 71797) @@ -51,9 +51,13 @@ /* basic test, get the current directory */ memset(path, 0, MAXPATHLEN); currp = bu_dir(NULL, 0, BU_DIR_CURR, NULL); - getcwd(path, MAXPATHLEN); - if (!BU_STR_EQUAL(path, currp)) + if (!getcwd(path, MAXPATHLEN)) { failures++; + } else { + if (!BU_STR_EQUAL(path, currp)) { + failures++; + } + } /* each directory lookup should return something */ for (type = BU_DIR_CURR; type != BU_DIR_UNKNOWN; type++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits