summaryrefslogtreecommitdiffstats
path: root/mbbsd/convert.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-05 01:13:35 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-05 01:13:35 +0800
commit57bb5ce6886b3e2b19a6376e0173a83efc8a1648 (patch)
treed24654c2ca0591ac2967f114e527fc86c29cb8f2 /mbbsd/convert.c
parentacea666b1d2913702055324e5a63f35e18d78250 (diff)
downloadpttbbs-57bb5ce6886b3e2b19a6376e0173a83efc8a1648.tar
pttbbs-57bb5ce6886b3e2b19a6376e0173a83efc8a1648.tar.gz
pttbbs-57bb5ce6886b3e2b19a6376e0173a83efc8a1648.tar.bz2
pttbbs-57bb5ce6886b3e2b19a6376e0173a83efc8a1648.tar.lz
pttbbs-57bb5ce6886b3e2b19a6376e0173a83efc8a1648.tar.xz
pttbbs-57bb5ce6886b3e2b19a6376e0173a83efc8a1648.tar.zst
pttbbs-57bb5ce6886b3e2b19a6376e0173a83efc8a1648.zip
make compiler happy
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2985 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/convert.c')
-rw-r--r--mbbsd/convert.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/mbbsd/convert.c b/mbbsd/convert.c
index 1c390ac3..85fc9eff 100644
--- a/mbbsd/convert.c
+++ b/mbbsd/convert.c
@@ -13,8 +13,10 @@ unsigned char *big2uni(unsigned char *, int *, int);
static ssize_t
gb_input(void *buf, ssize_t icount)
{
- gb2big((char *)buf, &icount, 0);
- return icount;
+ /* is sizeof(ssize_t) == sizeof(int)? not sure */
+ int ic = (int) icount;
+ gb2big((char *)buf, &ic, 0);
+ return (ssize_t)ic;
}
static ssize_t
@@ -40,9 +42,11 @@ gb_write(int fd, void *buf, size_t count)
static ssize_t
utf8_input (void *buf, ssize_t icount)
{
- utf8_uni(buf, &icount, 0);
- uni2big(buf, &icount, 0);
- return icount;
+ /* is sizeof(ssize_t) == sizeof(int)? not sure */
+ int ic = (int) icount;
+ utf8_uni(buf, &ic, 0);
+ uni2big(buf, &ic, 0);
+ return (ssize_t)ic;
}
static ssize_t