Emulator Issues #8667
closedBuild error: format not a string literal and no format arguments
0%
Description
Trying to build it on ubuntu 15.04, I got this error. Issue appeared between 2cb0732 (4.0-6484) and 6bc8599 (4.0-6732)
[ 20%] Building CXX object Source/Core/DiscIO/CMakeFiles/discio.dir/DiscScrubber.cpp.o
cd "/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/obj-x86_64-linux-gnu/Source/Core/DiscIO" && /usr/bin/x86_64-linux-gnu-g++ -DDATA_DIR="/usr/share/games/dolphin-emu/" -DHAVE_ALSA=1 -DHAVE_AO=1 -DHAVE_BLUEZ=1 -DHAVE_LIBAV -DHAVE_OPENAL=1 -DHAVE_PORTAUDIO=1 -DHAVE_PULSEAUDIO=1 -DHAVE_SDL=1 -DHAVE_WX=1 -DHAVE_X11=1 -DHAVE_X11_XINPUT2=1 -DHAVE_XRANDR=1 -DUSER_DIR=".dolphin-emu" -DUSE_UPNP -DWXUSINGDLL -D_ARCH_64=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86=1 -D_M_X86_64=1 -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D__WXGTK__ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -DNDEBUG -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wlogical-op -Wshadow -Winit-self -Wmissing-declarations -fvisibility-inlines-hidden -fvisibility=hidden -pthread -I"/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Externals/GL" -I/usr/include/AL -I"/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Source/Core" -I"/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Externals/Bochs_disasm" -I"/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Externals/enet/include" -I"/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Externals/xxhash" -I/usr/include/libpng12 -I"/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Externals" -I/usr/include/SDL2 -I/usr/include/libusb-1.0 -I/usr/include/miniupnpc -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -isystem /usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -I"/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/obj-x86_64-linux-gnu/Source/Core/Common" -I"/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Externals/gtest/include" -msse2 -Wall -fno-strict-aliasing -fno-exceptions -fPIE -std=gnu++0x -include '/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/obj-x86_64-linux-gnu/Source/CMakeFiles/pch.dir/pch.h' -o CMakeFiles/discio.dir/DiscScrubber.cpp.o -c "/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Source/Core/DiscIO/DiscScrubber.cpp"
In file included from /«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Source/Core/Common/Common.h:152:0,
from /«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/obj-x86_64-linux-gnu/Source/CMakeFiles/pch.dir/pch.h:78,
from <command-line>:0:
/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Source/Core/DiscIO/DiscScrubber.cpp: In function 'bool DiscIO::DiscScrubber::ParsePartitionData(DiscIO::DiscScrubber::SPartition&)':
/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Source/Core/Common/Logging/Log.h:96:51: error: format not a string literal and no format arguments [-Werror=format-security]
GenericLog(v, t, FILE, LINE, VA_ARGS);
^
/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Source/Core/Common/Logging/Log.h:104:31: note: in expansion of macro 'GENERIC_LOG'
#define DEBUG_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LDEBUG, VA_ARGS) } while (0)
^
/«BUILDDIR»/dolphin-emu-master-4.0+git+r31~9~ubuntu15.04.1/Source/Core/DiscIO/DiscScrubber.cpp:307:4: note: in expansion of macro 'DEBUG_LOG'
DEBUG_LOG(DISCIO, file.m_FullPath.empty() ? "/" : file.m_FullPath.c_str());
^
cc1plus: some warnings being treated as errors
Source/Core/DiscIO/CMakeFiles/discio.dir/build.make:154: recipe for target 'Source/Core/DiscIO/CMakeFiles/discio.dir/DiscScrubber.cpp.o' failed
make[4]: *** [Source/Core/DiscIO/CMakeFiles/discio.dir/DiscScrubber.cpp.o] Error 1
Updated by comexk over 9 years ago
You can fix it by changing to
DEBUG_LOG(DISCIO, "%s", file.m_FullPath [rest of original line
Not sure why I'm CCed.]
Updated by JMC4789 over 9 years ago
You were CC'd because I figured you'd know the solution. Is this a legitimate bug in Dolphin we need to fix?
Updated by sergiobenrocha2 over 9 years ago
Someone fixed it, you can close. Thanks!
Updated by sergiobenrocha2 over 9 years ago
It's fixed in the master branch, but not in the stable:
Updated by PEmu about 8 years ago
User claims that the issue is fixed in master. Can this report be closed?