summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-05-09 20:00:13 +0000
committerMiles Bader <miles@gnu.org>1997-05-09 20:00:13 +0000
commit55133b4d9a95a4c1a50f6fb68ff30de8698bb7ef (patch)
tree1d6e75a7874b784ba2b2297c78c8c4ed7831dc9a
parent3f77c307a83545d6374366fbe3a54674acf8a19c (diff)
Add casts to prevent warnings.
-rw-r--r--libshouldbeinlibc/argp-fmtstream.c8
-rw-r--r--libshouldbeinlibc/argp-fmtstream.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/libshouldbeinlibc/argp-fmtstream.c b/libshouldbeinlibc/argp-fmtstream.c
index ab2e870a..0c9b3118 100644
--- a/libshouldbeinlibc/argp-fmtstream.c
+++ b/libshouldbeinlibc/argp-fmtstream.c
@@ -157,7 +157,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
the end of the buffer. */
nl = fs->p;
}
- else if (fs->point_col + (nl - buf) < fs->rmargin)
+ else if (fs->point_col + (nl - buf) < (ssize_t) fs->rmargin)
{
/* The buffer contains a full line that fits within the maximum
line width. Reset point and scan the next line. */
@@ -309,7 +309,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
int
__argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
{
- if (fs->end - fs->p < amount)
+ if ((size_t) (fs->end - fs->p) < amount)
{
ssize_t wrote;
@@ -330,7 +330,7 @@ __argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
return 0;
}
- if (fs->end - fs->buf < amount)
+ if ((size_t) (fs->end - fs->buf) < amount)
/* Gotta grow the buffer. */
{
size_t new_size = fs->end - fs->buf + amount;
@@ -354,7 +354,7 @@ __argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
ssize_t
__argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...)
{
- size_t out;
+ int out;
size_t size_guess = PRINTF_SIZE_GUESS; /* How much space to reserve. */
do
diff --git a/libshouldbeinlibc/argp-fmtstream.h b/libshouldbeinlibc/argp-fmtstream.h
index 280a893c..d1a262a7 100644
--- a/libshouldbeinlibc/argp-fmtstream.h
+++ b/libshouldbeinlibc/argp-fmtstream.h
@@ -238,7 +238,7 @@ ARGP_FS_EI size_t
__argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin)
{
size_t __old;
- if (__fs->p - __fs->buf > __fs->point_offs)
+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
__argp_fmtstream_update (__fs);
__old = __fs->lmargin;
__fs->lmargin = __lmargin;
@@ -250,7 +250,7 @@ ARGP_FS_EI size_t
__argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin)
{
size_t __old;
- if (__fs->p - __fs->buf > __fs->point_offs)
+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
__argp_fmtstream_update (__fs);
__old = __fs->rmargin;
__fs->rmargin = __rmargin;
@@ -262,7 +262,7 @@ ARGP_FS_EI size_t
__argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
{
size_t __old;
- if (__fs->p - __fs->buf > __fs->point_offs)
+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
__argp_fmtstream_update (__fs);
__old = __fs->wmargin;
__fs->wmargin = __wmargin;
@@ -273,7 +273,7 @@ __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
ARGP_FS_EI size_t
__argp_fmtstream_point (argp_fmtstream_t __fs)
{
- if (__fs->p - __fs->buf > __fs->point_offs)
+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
__argp_fmtstream_update (__fs);
return __fs->point_col >= 0 ? __fs->point_col : 0;
}