os,picohttpparser,sokol,strconv: prepare for making -W impure-v the default (#19846)

This commit is contained in:
JalonSolov 2023-11-12 02:52:14 -05:00 committed by GitHub
parent a15c067189
commit c494b63d75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 5 additions and 5 deletions

View file

@ -49,11 +49,11 @@ const (
'vlib/io/os_file_reader_test.v', 'vlib/io/os_file_reader_test.v',
'vlib/os/process_test.v', 'vlib/os/process_test.v',
'vlib/os/file_test.v', 'vlib/os/file_test.v',
'vlib/os/notify/notify_test.v', 'vlib/os/notify/notify_test.c.v',
'vlib/os/filepath_test.v', 'vlib/os/filepath_test.v',
'vlib/os/environment_test.v', 'vlib/os/environment_test.v',
'vlib/os/glob_test.v', 'vlib/os/glob_test.v',
'vlib/os/os_test.v', 'vlib/os/os_test.c.v',
'vlib/rand/random_numbers_test.v', 'vlib/rand/random_numbers_test.v',
'vlib/rand/wyrand/wyrand_test.v', 'vlib/rand/wyrand/wyrand_test.v',
'vlib/runtime/runtime_test.v', 'vlib/runtime/runtime_test.v',
@ -63,7 +63,7 @@ const (
'vlib/sync/waitgroup_test.v', 'vlib/sync/waitgroup_test.v',
'vlib/sync/pool/pool_test.v', 'vlib/sync/pool/pool_test.v',
'vlib/strings/builder_test.v', 'vlib/strings/builder_test.v',
'vlib/strconv/atof_test.v', 'vlib/strconv/atof_test.c.v',
'vlib/strconv/atoi_test.v', 'vlib/strconv/atoi_test.v',
'vlib/strconv/f32_f64_to_string_test.v', 'vlib/strconv/f32_f64_to_string_test.v',
'vlib/strconv/format_test.v', 'vlib/strconv/format_test.v',

View file

@ -12,7 +12,7 @@ pub mut:
[inline] [inline]
pub fn (mut r Response) write_string(s string) { pub fn (mut r Response) write_string(s string) {
unsafe { unsafe {
C.memcpy(r.buf, s.str, s.len) vmemcpy(r.buf, s.str, s.len)
r.buf += s.len r.buf += s.len
} }
} }
@ -36,7 +36,7 @@ pub fn (mut r Response) header(k string, v string) &Response {
pub fn (mut r Response) header_date() &Response { pub fn (mut r Response) header_date() &Response {
r.write_string('Date: ') r.write_string('Date: ')
unsafe { unsafe {
C.memcpy(r.buf, r.date, 29) vmemcpy(r.buf, r.date, 29)
r.buf += 29 r.buf += 29
} }
r.write_string('\r\n') r.write_string('\r\n')