getc() return value does not fit into char

This commit is contained in:
naddy 2018-04-24 21:20:04 +00:00
parent 44145db89c
commit 62d39ed062
4 changed files with 44 additions and 1 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.24 2017/12/03 12:45:52 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.25 2018/04/24 21:20:04 naddy Exp $
COMMENT= common interface to speech synthesis
DISTNAME= speech-dispatcher-0.8.8
REVISION= 0
SHARED_LIBS += speechd 2.1 # .8.0

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_api_c_libspeechd_c,v 1.1 2018/04/24 21:20:04 naddy Exp $
Index: src/api/c/libspeechd.c
--- src/api/c/libspeechd.c.orig
+++ src/api/c/libspeechd.c
@@ -106,7 +106,7 @@ char *strndup(const char *s, size_t n)
#define BUFFER_LEN 256
ssize_t getline(char **lineptr, size_t * n, FILE * f)
{
- char ch;
+ int ch;
size_t m = 0;
ssize_t buf_len = 0;
char *buf = NULL;

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_clients_spdsend_spdsend_c,v 1.1 2018/04/24 21:20:04 naddy Exp $
Index: src/clients/spdsend/spdsend.c
--- src/clients/spdsend/spdsend.c.orig
+++ src/clients/spdsend/spdsend.c
@@ -39,7 +39,7 @@ const char *const SPDSEND_VERSION = "0.0.0";
#define BUFFER_LEN 256
ssize_t getline(char **lineptr, size_t * n, FILE * f)
{
- char ch;
+ int ch;
size_t m = 0;
ssize_t buf_len = 0;
char *buf = NULL;

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_common_spd_getline_c,v 1.1 2018/04/24 21:20:04 naddy Exp $
Index: src/common/spd_getline.c
--- src/common/spd_getline.c.orig
+++ src/common/spd_getline.c
@@ -46,7 +46,7 @@
ssize_t spd_getline(char **lineptr, size_t * n, FILE * f)
{
- char ch;
+ int ch;
ssize_t buf_pos = 0;
ssize_t needed = 2; /* Always buf_pos + 2 (see below). */
size_t new_length = 0;