lib: Fix compile warnings.
* lib/linux/read.c (read): Add casts. * lib/linux/signal.c (signal): Likewise. * lib/stdio/vfscanf.c: Include stdlib.h. (vfscanf): Add cast. * lib/stdlib/mbstowcs.c (mbstowcs): Add cast.
This commit is contained in:
parent
b28f42de07
commit
43fe67e2f9
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -27,7 +27,7 @@ ssize_t
|
||||||
read (int filedes, void *buffer, size_t size)
|
read (int filedes, void *buffer, size_t size)
|
||||||
{
|
{
|
||||||
long long_filedes = filedes;
|
long long_filedes = filedes;
|
||||||
ssize_t bytes = _sys_call3 (SYS_read, long_filedes, buffer, size);
|
ssize_t bytes = _sys_call3 (SYS_read, long_filedes, (long) buffer, (long) size);
|
||||||
if (__mes_debug () > 4)
|
if (__mes_debug () > 4)
|
||||||
{
|
{
|
||||||
if (bytes == 1)
|
if (bytes == 1)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -36,7 +36,7 @@ sighandler_t
|
||||||
signal (int signum, sighandler_t action)
|
signal (int signum, sighandler_t action)
|
||||||
{
|
{
|
||||||
#if __i386__
|
#if __i386__
|
||||||
return _sys_call2 (SYS_signal, signum, action);
|
return (sighandler_t) _sys_call2 (SYS_signal, signum, (long) action);
|
||||||
#else
|
#else
|
||||||
static struct sigaction setup_action = { 0 };
|
static struct sigaction setup_action = { 0 };
|
||||||
static struct sigaction old = { 0 };
|
static struct sigaction old = { 0 };
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2017,2018,2019,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
vfscanf (FILE * stream, char const *template, va_list ap)
|
vfscanf (FILE * stream, char const *template, va_list ap)
|
||||||
|
@ -76,7 +77,7 @@ vfscanf (FILE * stream, char const *template, va_list ap)
|
||||||
ungetc (p, stream);
|
ungetc (p, stream);
|
||||||
*q = 0;
|
*q = 0;
|
||||||
q = buf;
|
q = buf;
|
||||||
*d = abtol (&q, 10);
|
*d = abtol ((char const**)&q, 10);
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -30,6 +30,6 @@ mbstowcs (wchar_t * wstring, char const *string, size_t size)
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("mbstowcs stub\n");
|
eputs ("mbstowcs stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
strcpy (wstring, string);
|
strcpy ((char*)wstring, string);
|
||||||
return strlen (string);
|
return strlen (string);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue