From: Amos Jeffries Date: Fri, 28 Oct 2016 08:41:57 +0000 (+1300) Subject: Fix GCC 4.9 build after rev.14893 X-Git-Tag: SQUID_4_0_16~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f541701109765a3e0bb1bca3065f64d41b03c4e;p=thirdparty%2Fsquid.git Fix GCC 4.9 build after rev.14893 GCC 4.9 does not support some corner cases of C++11 syntax. In this case when it is presented with default nulptr initialization of function pointers it gets confused with 'pure virtual' initialization: error: invalid pure specifier (only '= 0' is allowed) before ';' token --- diff --git a/src/DiskIO/DiskThreads/DiskThreads.h b/src/DiskIO/DiskThreads/DiskThreads.h index 1a05e9478b..e399cddea0 100644 --- a/src/DiskIO/DiskThreads/DiskThreads.h +++ b/src/DiskIO/DiskThreads/DiskThreads.h @@ -70,15 +70,17 @@ class squidaio_ctrl_t { MEMPROXY_CLASS(squidaio_ctrl_t); public: + squidaio_ctrl_t() : done_handler(NULL), free_func(NULL) {} + squidaio_ctrl_t *next = nullptr; int fd = 0; int operation = 0; - AIOCB *done_handler = nullptr; + AIOCB *done_handler; void *done_handler_data = nullptr; squidaio_result_t result; int len = 0; char *bufp = nullptr; - FREE *free_func = nullptr; + FREE *free_func; dlink_node node; };