Skip to content

Commit

Permalink
Enable -Wall for Linux builds
Browse files Browse the repository at this point in the history
Since the code is based in Windows/Visual C++ the only warning that had
to be specifically disabled is -Wunknown-pragmas.  The remaining
warnings were cleaned up in the code.
  • Loading branch information
djp952 committed Feb 10, 2017
1 parent a153f6a commit f00f911
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion msbuild.proj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<PropertyGroup>
<BashExe>%WINDIR%\Sysnative\bash.exe</BashExe>
<CPPFLAGS>-I../external-kodi-addon-dev-kit/kodi -I../prebuilt-libcurl/include/curl -I../prebuilt-libuuid/include -I../external-sqlite -Itmp/version</CPPFLAGS>
<CPPFLAGS>-Wall -Wno-unknown-pragmas -I../external-kodi-addon-dev-kit/kodi -I../prebuilt-libcurl/include/curl -I../prebuilt-libuuid/include -I../external-sqlite -Itmp/version</CPPFLAGS>
<CFLAGS>-fPIC</CFLAGS>
<CXXFLAGS>-fPIC -std=c++14</CXXFLAGS>
<PackageVersion>$([System.IO.File]::ReadAllText($(SolutionDir)tmp\version\version.txt))</PackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/livestream.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ class livestream

// RING BUFFER
//
std::unique_ptr<uint8_t[]> m_buffer; // Ring buffer stroage
size_t const m_buffersize; // Size of the ring buffer
std::unique_ptr<uint8_t[]> m_buffer; // Ring buffer stroage
bool m_bufferempty = true; // Flag for empty ring buffer
bool m_bufferfull = false; // Flag for full ring buffer
std::atomic<size_t> m_bufferhead{0}; // Head (write) buffer position
Expand Down
1 change: 1 addition & 0 deletions src/pvr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ static void log_message(addoncallbacks::addon_log_t level, _args&&... args)
{
std::ostringstream stream;
int unpack[] = {0, ( static_cast<void>(stream << args), 0 ) ... };
(void)unpack;

if(g_addon) g_addon->Log(level, stream.str().c_str());
if (level == addoncallbacks::addon_log_t::LOG_ERROR) fprintf(stderr, "ERROR: %s\r\n", stream.str().c_str());
Expand Down
1 change: 1 addition & 0 deletions src/string_exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class string_exception : public std::exception
{
std::ostringstream stream;
int unpack[] = {0, ( static_cast<void>(stream << args), 0 ) ... };
(void)unpack;

return stream.str();
}
Expand Down

0 comments on commit f00f911

Please sign in to comment.