diff options
author | smh <smh@FreeBSD.org> | 2016-01-12 02:17:39 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2016-01-12 02:17:39 +0000 |
commit | 5bfbb8e2e501c2ed4209fb168e9878e598acc192 (patch) | |
tree | 4520281a4158d809c8e552821a3d2ed21e225359 /sys/boot/efi/libefi | |
parent | 0517d6cfae2a854c90ccf67ec23cfa18945a67ac (diff) | |
download | FreeBSD-src-5bfbb8e2e501c2ed4209fb168e9878e598acc192.zip FreeBSD-src-5bfbb8e2e501c2ed4209fb168e9878e598acc192.tar.gz |
Enable warnings in EFI boot code
Set WARNS if not set for EFI boot code and fix the issues highlighted by
setting it.
Most components are set to WARNS level 6 with few being left at lower
levels due to the amount of changes needed to fix at higher levels.
Error types fixed:
* Missing / invalid casts
* Missing inner structs
* Unused vars
* Missing static for internal only funcs
* Missing prototypes
* Alignment changes
* Use of uninitialised vars
* Unknown pragma (intrinsic)
* Missing types etc due to missing includes
* printf formatting types
Reviewed by: emaste (in part)
MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4839
Diffstat (limited to 'sys/boot/efi/libefi')
-rw-r--r-- | sys/boot/efi/libefi/Makefile | 1 | ||||
-rw-r--r-- | sys/boot/efi/libefi/efi_console.c | 2 | ||||
-rw-r--r-- | sys/boot/efi/libefi/efipart.c | 1 | ||||
-rw-r--r-- | sys/boot/efi/libefi/libefi.c | 2 |
4 files changed, 4 insertions, 2 deletions
diff --git a/sys/boot/efi/libefi/Makefile b/sys/boot/efi/libefi/Makefile index 25251c5..bb2f9ea 100644 --- a/sys/boot/efi/libefi/Makefile +++ b/sys/boot/efi/libefi/Makefile @@ -2,6 +2,7 @@ LIB= efi INTERNALLIB= +WARNS?= 2 SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \ libefi.c time.c diff --git a/sys/boot/efi/libefi/efi_console.c b/sys/boot/efi/libefi/efi_console.c index 52a3725..daf1338 100644 --- a/sys/boot/efi/libefi/efi_console.c +++ b/sys/boot/efi/libefi/efi_console.c @@ -47,6 +47,8 @@ static int esc; void get_pos(int *x, int *y); void curs_move(int *_x, int *_y, int x, int y); static void CL(int); +void HO(void); +void end_term(void); #endif static void efi_cons_probe(struct console *); diff --git a/sys/boot/efi/libefi/efipart.c b/sys/boot/efi/libefi/efipart.c index 0831a98..757d64f 100644 --- a/sys/boot/efi/libefi/efipart.c +++ b/sys/boot/efi/libefi/efipart.c @@ -67,7 +67,6 @@ efipart_init(void) EFI_HANDLE *hin, *hout, *aliases, handle; EFI_STATUS status; UINTN sz; - CHAR16 *path; u_int n, nin, nout; int err; size_t devpathlen; diff --git a/sys/boot/efi/libefi/libefi.c b/sys/boot/efi/libefi/libefi.c index 3c66b04..0c24c6d 100644 --- a/sys/boot/efi/libefi/libefi.c +++ b/sys/boot/efi/libefi/libefi.c @@ -179,7 +179,7 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) argv = malloc((argc + 1) * sizeof(CHAR16*)); argc = 0; if (addprog) - argv[argc++] = L"loader.efi"; + argv[argc++] = (CHAR16 *)"loader.efi"; argp = args; while (argp != NULL && *argp != 0) { argp = arg_skipsep(argp); |