Skip to content

Commit 06ca3dd

Browse files
authored
Merge pull request #474 from retrage/v5.3-fixes
Suppress gcc warnings
2 parents 0a25540 + fd54f45 commit 06ca3dd

5 files changed

Lines changed: 12 additions & 3 deletions

File tree

arch/lkl/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ generic-y += mmu.h
4040
generic-y += mmu_context.h
4141
generic-y += module.h
4242
generic-y += msgbuf.h
43-
generic-y += page.h
4443
generic-y += param.h
4544
generic-y += parport.h
4645
generic-y += pci.h

arch/lkl/include/uapi/asm/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#define __ARCH_WANT_SET_GET_RLIMIT
77
#define __ARCH_WANT_TIME32_SYSCALLS
88

9+
#include <asm/bitsperlong.h>
10+
911
#if __BITS_PER_LONG == 64
1012
#define __ARCH_WANT_SYS_NEWFSTATAT
1113
#endif

arch/lkl/kernel/misc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <asm/ptrace.h>
66
#include <asm/host_ops.h>
77

8+
#ifdef CONFIG_PRINTK
89
void dump_stack(void)
910
{
1011
unsigned long dummy;
@@ -15,13 +16,15 @@ void dump_stack(void)
1516
while (((long)stack & (THREAD_SIZE - 1)) != 0) {
1617
addr = *stack;
1718
if (__kernel_text_address(addr)) {
18-
pr_info("%p: [<%08lx>] %pS", stack, addr, addr);
19+
pr_info("%p: [<%08lx>] %pS", stack, addr,
20+
(void *)addr);
1921
pr_cont("\n");
2022
}
2123
stack++;
2224
}
2325
pr_info("\n");
2426
}
27+
#endif
2528

2629
void show_regs(struct pt_regs *regs)
2730
{

arch/lkl/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ int __init lkl_start_kernel(struct lkl_host_operations *ops,
6161
va_end(ap);
6262

6363
if (ops->virtio_devices)
64-
strncpy(boot_command_line + ret, ops->virtio_devices,
64+
strscpy(boot_command_line + ret, ops->virtio_devices,
6565
COMMAND_LINE_SIZE - ret);
6666

6767
memcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE);

tools/lkl/lib/config.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include <stdlib.h>
22
#define _HAVE_STRING_ARCH_strtok_r
33
#include <string.h>
4+
#ifndef __MINGW32__
5+
#include <arpa/inet.h>
6+
#else
7+
#define inet_pton lkl_inet_pton
8+
#endif
49
#include <lkl_host.h>
510
#include <lkl_config.h>
611

0 commit comments

Comments
 (0)