PlatformLab / NanoLog

Nanolog is an extremely performant nanosecond scale logging system for C++ that exposes a simple printf-like API.
Other
3k stars 343 forks source link

fix compile error #11

Closed hxdnshx closed 5 years ago

hxdnshx commented 5 years ago

Environment: g++ 9.1.0

g++ -std=c++11 -O3 -DNDEBUG -g -Wall -Wformat=2 -Wextra -Wwrite-strings -Wno-unused-parameter -Wmissing-format-attribute -Wno-non-template-friend -Woverloaded-virtual -Wcast-qual -Wcast-align -Waddress-of-packed-member -Wconversion -Weffc++ -c -o generated/GeneratedCode.o generated/GeneratedCode.cc -I ../runtime -Igenerated
../runtime/Log.cc: In member function 'bool NanoLogInternal::Log::Encoder::encodeBufferExtentStart(uint32_t, bool)':
../runtime/Log.cc:434:61: error: taking address of packed member of 'NanoLogInternal::Log::BufferExtent' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  434 |     currentExtentSize = (decltype(currentExtentSize))(char*)&(tc->length);
      |