1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: fix most C warnings (#6758)

This commit is contained in:
spaceface777
2020-11-06 15:26:59 +01:00
committed by GitHub
parent 98e8894d90
commit a9e9554b11
16 changed files with 89 additions and 90 deletions

View File

@ -88,7 +88,7 @@ fn print_backtrace_skipping_top_frames_linux(skipframes int) bool {
return false
}
buffer := [100]byteptr{}
nr_ptrs := C.backtrace(buffer, 100)
nr_ptrs := C.backtrace(voidptr(buffer), 100)
if nr_ptrs < 2 {
eprintln('C.backtrace returned less than 2 frames')
return false
@ -96,7 +96,7 @@ fn print_backtrace_skipping_top_frames_linux(skipframes int) bool {
nr_actual_frames := nr_ptrs - skipframes
mut sframes := []string{}
//////csymbols := backtrace_symbols(*voidptr(&buffer[skipframes]), nr_actual_frames)
csymbols := C.backtrace_symbols(&buffer[skipframes], nr_actual_frames)
csymbols := C.backtrace_symbols(voidptr(&buffer[skipframes]), nr_actual_frames)
for i in 0 .. nr_actual_frames {
sframes << unsafe {tos2( byteptr(csymbols[i]) )}
}