cast large to reduce warning on 32-bit machines (an ELF type is printed with %ll)
authorderaadt <deraadt@openbsd.org>
Wed, 10 Feb 2021 00:34:57 +0000 (00:34 +0000)
committerderaadt <deraadt@openbsd.org>
Wed, 10 Feb 2021 00:34:57 +0000 (00:34 +0000)
usr.sbin/btrace/ksyms.c

index b599f66..09fbd81 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ksyms.c,v 1.3 2020/12/07 18:28:09 bluhm Exp $ */
+/*     $OpenBSD: ksyms.c,v 1.4 2021/02/10 00:34:57 deraadt Exp $ */
 
 /*
  * Copyright (c) 2016 Martin Pieuchot <mpi@openbsd.org>
@@ -129,7 +129,7 @@ kelf_snprintsym(char *str, size_t size, unsigned long pc)
                int l;
 
                l = snprintf(str + cnt, size > (size_t)cnt ? size - cnt : 0,
-                   "+0x%llx", offset);
+                   "+0x%llx", (unsigned long long)offset);
                if (l < 0)
                        return l;
                cnt += l;