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