From ef3c8c10e1d786b06d04e25246446d0477237775 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 6 Sep 2010 07:11:27 +0000 Subject: [PATCH] Fix gcc warning. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35294 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/filetools.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 521d77ec9b..4379624383 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -741,9 +741,9 @@ docstring const makeDisplayPath(string const & path, unsigned int threshold) } +#ifdef HAVE_READLINK bool readLink(FileName const & file, FileName & link) { -#ifdef HAVE_READLINK char linkbuffer[PATH_MAX + 1]; string const encoded = file.toFilesystemEncoding(); int const nRead = ::readlink(encoded.c_str(), @@ -753,10 +753,13 @@ bool readLink(FileName const & file, FileName & link) linkbuffer[nRead] = '\0'; // terminator link = makeAbsPath(linkbuffer, onlyPath(file.absFileName())); return true; -#else - return false; -#endif } +#else +bool readLink(FileName const &, FileName &) +{ + return false; +} +#endif cmd_ret const runCommand(string const & cmd)