catch warnings
This commit is contained in:
parent
e9eb030bb6
commit
801c4cb369
|
@ -233,7 +233,7 @@ PL_EXPORT_DATA(IOSTREAM) S__iob[3]; /* Libs standard streams */
|
|||
static inline void
|
||||
S__checkpasteeof(IOSTREAM *s, int c)
|
||||
{
|
||||
if ( (c)==-1 && (s)->flags & (SIO_FEOF|SIO_FERR) )
|
||||
if ( (c)==-1 && ((s)->flags & (SIO_FEOF|SIO_FERR)) )
|
||||
((s)->flags |= SIO_FEOF2);
|
||||
}
|
||||
|
||||
|
|
|
@ -2008,7 +2008,7 @@ found:
|
|||
ref = PL_blob_data(sblob, NULL, &type);
|
||||
if ( type == &stream_blob ) /* got a stream handle */
|
||||
{ if ( ref->read && ref->write && /* stream pair */
|
||||
info->flags & SS_NOPAIR )
|
||||
(info->flags & SS_NOPAIR) )
|
||||
return PL_error("set_stream", 2, NULL, ERR_PERMISSION,
|
||||
aname, ATOM_stream_pair, stream);
|
||||
|
||||
|
@ -3421,7 +3421,7 @@ pl_seen(void)
|
|||
|
||||
pop_input_context();
|
||||
|
||||
if ( s && s->flags & SIO_NOFEOF )
|
||||
if ( s && (s->flags & SIO_NOFEOF) )
|
||||
return TRUE;
|
||||
|
||||
if ( s )
|
||||
|
@ -3523,7 +3523,7 @@ PRED_IMPL("told", 0, told, 0)
|
|||
|
||||
popOutputContext();
|
||||
|
||||
if ( s && s->flags & SIO_NOFEOF )
|
||||
if ( s && (s->flags & SIO_NOFEOF) )
|
||||
return TRUE;
|
||||
|
||||
if ( s )
|
||||
|
@ -4272,6 +4272,7 @@ PRED_IMPL("stream_property", 2, stream_property,
|
|||
return FALSE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -968,7 +968,7 @@ static unsigned char *
|
|||
backSkipUTF8(unsigned const char *start, unsigned const char *end, int *chr)
|
||||
{ const unsigned char *s;
|
||||
|
||||
for(s=end-1 ; s>start && *s&0x80; s--)
|
||||
for(s=end-1 ; s>start && ( *s&0x80 ); s--)
|
||||
;
|
||||
utf8_get_char((char*)s, chr);
|
||||
|
||||
|
|
|
@ -1343,6 +1343,7 @@ ScheckBOM(IOSTREAM *s)
|
|||
return 0; /* empty stream */
|
||||
s->bufp--;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2648,6 +2649,7 @@ Sread_file(void *handle, char *buf, size_t size)
|
|||
|
||||
return bytes;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in New Issue