From 7ca23f6316ea4ee9e70ad8acb95ba5f11e34434f Mon Sep 17 00:00:00 2001 From: jhuntos Date: Sun, 6 Aug 2023 06:09:16 +0200 Subject: [PATCH] picoev: add initial values for struct field callbacks, to fix new compiler notices (#19065) Missing initial value for struct values --- vlib/picoev/picoev.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/picoev/picoev.v b/vlib/picoev/picoev.v index d8e78d2a14..f8e1d92a2f 100644 --- a/vlib/picoev/picoev.v +++ b/vlib/picoev/picoev.v @@ -23,7 +23,7 @@ pub mut: fd int loop_id int = -1 events u32 - cb fn (int, int, voidptr) + cb fn (int, int, voidptr) = unsafe { nil } // used internally by the kqueue implementation backend int } @@ -31,7 +31,7 @@ pub mut: pub struct Config { pub: port int = 8080 - cb fn (voidptr, picohttpparser.Request, mut picohttpparser.Response) + cb fn (voidptr, picohttpparser.Request, mut picohttpparser.Response) = unsafe { nil } err_cb fn (voidptr, picohttpparser.Request, mut picohttpparser.Response, IError) = default_err_cb user_data voidptr = unsafe { nil } timeout_secs int = 8 @@ -42,7 +42,7 @@ pub: [heap] pub struct Picoev { - cb fn (voidptr, picohttpparser.Request, mut picohttpparser.Response) + cb fn (voidptr, picohttpparser.Request, mut picohttpparser.Response) = unsafe { nil } err_cb fn (voidptr, picohttpparser.Request, mut picohttpparser.Response, IError) = default_err_cb user_data voidptr = unsafe { nil }