Yellow-Camper / libevhtp

Create extremely-fast and secure embedded HTTP servers with ease.
https://criticalstack.com/
BSD 3-Clause "New" or "Revised" License
426 stars 162 forks source link

evhtp.c:330:12: warning: implicit declaration of function ‘event_set_mem_functions’ #137

Open blshkv opened 5 years ago

blshkv commented 5 years ago

sys-devel/gcc-8.3.0 produced the following warning:

Here is the exact command:

[6/8] /usr/bin/x86_64-pc-linux-gnu-gcc -DEVHTP_HAS_C99 -DEVHTP_HAS_SYS_TYPES -DEVHTP_SYS_ARCH=64 -DPROJECT
_VERSION=1.2.18 -Devhtp_EXPORTS -Icompat -Iinclude -I/var/tmp/portage/net-libs/libevhtp-1.2.18/work/libevh
tp-1.2.18/include  -DNDEBUG -march=native -O2 -pipe -frecord-gcc-switches -fPIC -fvisibility=hidden   -fst
ack-protector-strong -MD -MT CMakeFiles/evhtp.dir/evhtp.c.o -MF CMakeFiles/evhtp.dir/evhtp.c.o.d -o CMakeF
iles/evhtp.dir/evhtp.c.o -c /var/tmp/portage/net-libs/libevhtp-1.2.18/work/libevhtp-1.2.18/evhtp.c        
/var/tmp/portage/net-libs/libevhtp-1.2.18/work/libevhtp-1.2.18/evhtp.c: In function ‘evhtp_set_mem_functio
ns’:                                                                                                      
/var/tmp/portage/net-libs/libevhtp-1.2.18/work/libevhtp-1.2.18/evhtp.c:330:12: warning: implicit declarati
on of function ‘event_set_mem_functions’; did you mean ‘evhtp_set_mem_functions’? [-Wimplicit-function-dec
laration]                                                                                                 
     return event_set_mem_functions(malloc_, realloc_, free_);                                            
            ^~~~~~~~~~~~~~~~~~~~~~~                                                                       
            evhtp_set_mem_functions                                                                       
/var/tmp/portage/net-libs/libevhtp-1.2.18/work/libevhtp-1.2.18/evhtp.c:330:12: warning: ‘return’ with a va
lue, in function returning void                                                                           
     return event_set_mem_functions(malloc_, realloc_, free_);                                            
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                             
/var/tmp/portage/net-libs/libevhtp-1.2.18/work/libevhtp-1.2.18/evhtp.c:321:1: note: declared here         
 evhtp_set_mem_functions(void *(*mallocfn_)(size_t len),                                                  
 ^~~~~~~~~~~~~~~~~~~~~~~