mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-22 03:12:20 -04:00
Compile without warning.
This commit is contained in:
parent
eccf5e194c
commit
53b2dadfce
@ -1,7 +1,7 @@
|
||||
project('kiwix-tools', 'cpp',
|
||||
version : '0.4.0',
|
||||
license : 'GPL',
|
||||
default_options: ['c_std=c11', 'cpp_std=c++11'])
|
||||
default_options: ['c_std=c11', 'cpp_std=c++11', 'werror=true'])
|
||||
|
||||
compiler = meson.get_compiler('cpp')
|
||||
|
||||
|
@ -79,10 +79,8 @@ int main(int argc, char** argv)
|
||||
|
||||
/* Start to read an article */
|
||||
if (reader != NULL) {
|
||||
string mainPageUrl = reader->getMainPageUrl();
|
||||
string content;
|
||||
string contentType;
|
||||
unsigned int contentLength = 0;
|
||||
string suggestion;
|
||||
|
||||
if (pattern != NULL) {
|
||||
@ -94,13 +92,6 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (reader->getContentByUrl(mainPageUrl, content, contentLength,
|
||||
contentType)) {
|
||||
cout << content << endl;
|
||||
}
|
||||
*/
|
||||
|
||||
delete reader;
|
||||
} else {
|
||||
cerr << "Unable instanciate the Kiwix reader." << endl;
|
||||
|
@ -218,8 +218,8 @@ static struct MHD_Response* build_response(const void* data,
|
||||
bool cacheEnabled)
|
||||
{
|
||||
/* Create the response */
|
||||
struct MHD_Response* response = MHD_create_response_from_data(
|
||||
length, const_cast<void*>(data), MHD_NO, MHD_YES);
|
||||
struct MHD_Response* response = MHD_create_response_from_buffer(
|
||||
length, const_cast<void*>(data), MHD_RESPMEM_MUST_COPY);
|
||||
|
||||
/* Make a redirection if necessary otherwise send the content */
|
||||
if (!httpRedirection.empty()) {
|
||||
@ -784,7 +784,7 @@ int main(int argc, char** argv)
|
||||
string rootPath;
|
||||
string interface;
|
||||
int serverPort = 80;
|
||||
int daemonFlag = false;
|
||||
int daemonFlag [[gnu::unused]] = false;
|
||||
int libraryFlag = false;
|
||||
string PPIDString;
|
||||
unsigned int PPID = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user