From cd32499180b17d8b58e70dd4b5a1ee3bae4e54e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Me=C3=9Fmer?= Date: Thu, 15 Oct 2015 05:27:31 +0200 Subject: [PATCH] Workaround compiler warning --- fuse/Fuse.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fuse/Fuse.cpp b/fuse/Fuse.cpp index edbbd446..0554b25e 100644 --- a/fuse/Fuse.cpp +++ b/fuse/Fuse.cpp @@ -223,8 +223,8 @@ void Fuse::run(int argc, char **argv) { } void Fuse::_addRunInForegroundOption(vector *argv) { - //TODO Fix char* warning (-Wwrite-strings) - static char *foregroundOption = "-f"; + //TODO Is this without the const_cast hack possible? Can I pass (const char*) to fuse_main? + static char *foregroundOption = const_cast("-f"); bool hasRunInForegroundOption = std::find_if(argv->begin(), argv->end(), [] (char *elem) {return string(elem) == string(foregroundOption);} ) != argv->end();