File fix-no-return-in-nonvoid-function.patch of Package codelite
diff -rupN codelite-8.1/CodeFormatter/codeformatter.cpp codelite-8.1-new/CodeFormatter/codeformatter.cpp
--- codelite-8.1/CodeFormatter/codeformatter.cpp 2015-08-01 08:16:28.000000000 +0200
+++ codelite-8.1-new/CodeFormatter/codeformatter.cpp 2015-10-06 20:50:06.878881643 +0200
@@ -22,6 +22,7 @@
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
+#include <cassert>
#include "precompiled_header.h"
#include "globals.h"
#include "editor_config.h"
@@ -804,6 +805,10 @@ bool CodeFormatter::BatchFormat(const st
} else if(options.GetEngine() == kFormatEngineClangFormat) {
return ClangBatchFormat(files, options);
}
+ CL_DEBUG("ERROR: WRONG ENGINE SET");
+ // Make sure to not return random data.
+ assert(false);
+ return false;
}
bool CodeFormatter::ClangBatchFormat(const std::vector<wxFileName>& files, const FormatOptions& options)
diff -rupN codelite-8.1/CodeFormatter/formatoptions.h codelite-8.1-new/CodeFormatter/formatoptions.h
--- codelite-8.1/CodeFormatter/formatoptions.h 2015-08-01 08:16:28.000000000 +0200
+++ codelite-8.1-new/CodeFormatter/formatoptions.h 2015-10-06 20:53:47.210875133 +0200
@@ -182,7 +182,7 @@ public:
void SetClangFormatOptions(size_t clangFormatOptions) { this->m_clangFormatOptions = clangFormatOptions; }
size_t GetClangFormatOptions() const { return m_clangFormatOptions; }
size_t GetPHPFormatterOptions() const { return m_phpFormatOptions; }
- size_t SetPHPFormatterOptions(size_t options) { m_phpFormatOptions = options; }
+ void SetPHPFormatterOptions(size_t options) { m_phpFormatOptions = options; }
bool HasFlag(eCF_GeneralOptions flag) const { return m_generalFlags & flag; }
void SetFlag(eCF_GeneralOptions flag, bool b) { b ? m_generalFlags |= flag : m_generalFlags &= ~flag; }
void SetPHPCSFixerPhar(const wxString& PHPCSFixerPhar) { this->m_PHPCSFixerPhar = PHPCSFixerPhar; }