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. */
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;
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;
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
__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;
__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;
__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;
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;
}
const char *fstr = filter_doc (tstr, real->key, entry->argp, state);
if (fstr && *fstr)
{
- unsigned col = __argp_fmtstream_point (stream);
+ unsigned int col = __argp_fmtstream_point (stream);
__argp_fmtstream_set_lmargin (stream, uparams.opt_doc_col);
__argp_fmtstream_set_wmargin (stream, uparams.opt_doc_col);
- if (col > uparams.opt_doc_col + 3)
+ if (col > (unsigned int) (uparams.opt_doc_col + 3))
__argp_fmtstream_putc (stream, '\n');
- else if (col >= uparams.opt_doc_col)
+ else if (col >= (unsigned int) uparams.opt_doc_col)
__argp_fmtstream_puts (stream, " ");
else
indent_to (stream, uparams.opt_doc_col);