fix/silence various compiler warnings.

* ifdef unused static functions
* brackets around assignment and comparision
* no return statement in function returning non-void
* boost concept_checks.hpp unused-local-typedefs
This commit is contained in:
Robin Gareus 2014-11-23 22:04:32 +01:00
parent f1926dc863
commit 5aba4df252
7 changed files with 17 additions and 4 deletions

View File

@ -129,6 +129,7 @@ Click OK to exit %1."), PROGRAM_NAME, AudioEngine::instance()->current_backend_n
return false; /* do not call again */
}
#ifndef PLATFORM_WINDOWS
static void
sigpipe_handler (int /*signal*/)
{
@ -143,6 +144,7 @@ sigpipe_handler (int /*signal*/)
done_the_backend_thing = true;
}
}
#endif
#if (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
/*

View File

@ -42,6 +42,7 @@
using std::string;
using namespace ARDOUR;
#ifndef PLATFORM_WINDOWS // no pingback for windows, so far
static size_t
curl_write_data (char *bufptr, size_t size, size_t nitems, void *ptr)
{
@ -61,6 +62,7 @@ curl_write_data (char *bufptr, size_t size, size_t nitems, void *ptr)
return size * nitems;
}
#endif
struct ping_call {
std::string version;

View File

@ -40,7 +40,9 @@ public:
}
private:
#ifndef PLATFORM_WINDOWS
static char * _vfork_exec_wrapper;
#endif
}; /* end class */

View File

@ -200,7 +200,7 @@ vst_search_path ()
if (pProgFilesX86) {
// Look for a VST folder under C:\Program Files (x86)
if (pVSTx86 = g_build_filename (pProgFilesX86, "Steinberg", "VSTPlugins", NULL))
if ((pVSTx86 = g_build_filename (pProgFilesX86, "Steinberg", "VSTPlugins", NULL)))
{
if (Glib::file_test (pVSTx86, Glib::FILE_TEST_EXISTS))
if (Glib::file_test (pVSTx86, Glib::FILE_TEST_IS_DIR))
@ -218,7 +218,7 @@ vst_search_path ()
char *pProgFiles = PBD::get_win_special_folder (CSIDL_PROGRAM_FILES);
if (pProgFiles) {
if (pVST = g_build_filename (pProgFiles, "Steinberg", "VSTPlugins", NULL)) {
if ((pVST = g_build_filename (pProgFiles, "Steinberg", "VSTPlugins", NULL))) {
if (Glib::file_test (pVST, Glib::FILE_TEST_EXISTS))
if (Glib::file_test (pVST, Glib::FILE_TEST_IS_DIR))
p = g_build_filename (pVST, NULL);

View File

@ -27,7 +27,9 @@
using namespace ARDOUR;
#ifndef PLATFORM_WINDOWS
char * SystemExec::_vfork_exec_wrapper = NULL;
#endif
static char *vfork_exec_wrapper_path() {
#ifdef PLATFORM_WINDOWS

View File

@ -99,7 +99,12 @@ mountpoint (string path)
string
mountpoint (string path)
{
// TODO ... if needed
/* this function is currently only called from 'old_peak_path()'
* via find_broken_peakfile() - only relevant for loading pre
* libsndfile Ardour 2.0 sessions.
*/
assert(0);
return ""; // TODO ... if needed
}
#else // !HAVE_GETMNTENT

View File

@ -385,7 +385,7 @@ def set_compiler_flags (conf,opt):
('-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align', '-Wno-unused-parameter'))
c_flags.extend(('-Wstrict-prototypes', '-Wmissing-prototypes'))
cxx_flags.append('-Woverloaded-virtual')
cxx_flags.extend(('-Woverloaded-virtual', '-Wno-unused-local-typedefs))
#
# more boilerplate