Fix few warnings
Remaining warnings (openlibm excluded):
###############################################################################
warning: src/c/dlmalloc.c:550:7: warning: mismatch in argument 3 type of built-in function ‘memcpy’; expected ‘long unsigned int’ [-Wbuiltin-declaration-mismatch]
warning: 550 | void *memcpy(void *dest, const void *src, size_t n);
warning: | ^~~~~~
warning: src/c/dlmalloc.c:551:7: warning: mismatch in argument 3 type of built-in function ‘memset’; expected ‘long unsigned int’ [-Wbuiltin-declaration-mismatch]
warning: 551 | void *memset(void *s, int c, size_t n);
warning: | ^~~~~~
warning: src/c/stdio.c:39:5: warning: mismatch in argument 2 type of built-in function ‘vsnprintf’; expected ‘long unsigned int’ [-Wbuiltin-declaration-mismatch]
warning: 39 | int vsnprintf(char * s, size_t n, const char * fmt, va_list ap);
warning: | ^~~~~~~~~
warning: src/c/stdio.c:41:5: warning: mismatch in argument 2 type of built-in function ‘snprintf’; expected ‘long unsigned int’ [-Wbuiltin-declaration-mismatch]
warning: 41 | int snprintf(char * s, size_t n, const char * fmt, ...) {
warning: | ^~~~~~~~
###############################################################################
pte_throw.c: In function ‘pte_throw’:
pte_throw.c:85:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
85 | exitCode = (unsigned) PTHREAD_CANCELED;
| ^
pte_throw.c:88:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
88 | exitCode = (unsigned) sp->exitStatus;;
| ^
###############################################################################
pthread_timechange_handler_np.c: In function ‘pthread_timechange_handler_np’:
pthread_timechange_handler_np.c:113:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
113 | return (void *) (result != 0 ? EAGAIN : 0);
| ^
###############################################################################
pte_threadStart.c: In function ‘pte_threadStart’:
pte_threadStart.c:245:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
245 | return (unsigned) status;
| ^
###############################################################################
warning: `extern` block uses type `core::panic::PanicInfo` which is not FFI-safe: this struct has unspecified layout
--> src/crt0/src/lib.rs:35:29
|
35 | fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(improper_ctypes)] on by default
= help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
###############################################################################
warning: `extern` block uses type `core::panic::PanicInfo` which is not FFI-safe: this struct has unspecified layout
--> src/crti/src/lib.rs:55:29
|
55 | fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(improper_ctypes)] on by default
= help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
###############################################################################
warning: `extern` block uses type `core::panic::PanicInfo` which is not FFI-safe: this struct has unspecified layout
--> src/crtn/src/lib.rs:45:29
|
45 | fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(improper_ctypes)] on by default
= help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
###############################################################################
warning: `extern` block uses type `core::panic::PanicInfo` which is not FFI-safe: this struct has unspecified layout
--> src/ld_so/src/lib.rs:61:29
|
61 | fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(improper_ctypes)] on by default
= help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct
###############################################################################
unistd/brk.c: In function ‘main’:
unistd/brk.c:11:30: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
11 | int status = brk(current + 4096);
| ^