C backend: fix a couple of C warnings on Linux
parent
243626c7c1
commit
2ac80485c0
|
@ -18,8 +18,6 @@ pub:
|
|||
|
||||
// Private function, used by V (`nums := []int`)
|
||||
fn new_array(mylen, cap, elm_size int) array {
|
||||
a := 3
|
||||
_ = a
|
||||
//println(a)
|
||||
arr := array {
|
||||
len: mylen
|
||||
|
|
|
@ -38,7 +38,7 @@ pub fn print_backtrace_skipping_top_frames(skipframes int) {
|
|||
if C.backtrace_symbols_fd != 0 {
|
||||
buffer := [100]byteptr
|
||||
nr_ptrs := C.backtrace(*voidptr(buffer), 100)
|
||||
C.backtrace_symbols_fd(&buffer[skipframes], nr_ptrs-skipframes, 1)
|
||||
C.backtrace_symbols_fd(*voidptr(&buffer[skipframes]), nr_ptrs-skipframes, 1)
|
||||
return
|
||||
}else{
|
||||
C.printf('backtrace_symbols_fd is missing, so printing backtraces is not available.\n')
|
||||
|
|
|
@ -179,7 +179,7 @@ pub fn (n i64) hex() string {
|
|||
19
|
||||
}
|
||||
hex := malloc(len)
|
||||
count := int(C.sprintf(*char(hex), '0x%llx', n))
|
||||
count := int(C.sprintf(*char(hex), '0x%lx', n))
|
||||
return tos(hex, count)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue