mirror of git://sourceware.org/git/glibc.git
stdio-common: Add nonnull attribute to stdio_ext.h functions.
* stdio-common/stdio_ext.h (__fbufsize, __freading, __fwriting) (__freadable, __fwritable, __flbf, __fpurge, __fpending, __fsetlocking): Add __nonnull ((1)) to these functions since they access the FP without checking if it is NULL. Signed-off-by: Collin Funk <collin.funk1@gmail.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
e529bfe8de
commit
b2970d5e5b
|
@ -43,43 +43,43 @@ __BEGIN_DECLS
|
|||
|
||||
/* Return the size of the buffer of FP in bytes currently in use by
|
||||
the given stream. */
|
||||
extern size_t __fbufsize (FILE *__fp) __THROW;
|
||||
extern size_t __fbufsize (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
|
||||
/* Return non-zero value iff the stream FP is opened readonly, or if the
|
||||
last operation on the stream was a read operation. */
|
||||
extern int __freading (FILE *__fp) __THROW;
|
||||
extern int __freading (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
/* Return non-zero value iff the stream FP is opened write-only or
|
||||
append-only, or if the last operation on the stream was a write
|
||||
operation. */
|
||||
extern int __fwriting (FILE *__fp) __THROW;
|
||||
extern int __fwriting (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
|
||||
/* Return non-zero value iff stream FP is not opened write-only or
|
||||
append-only. */
|
||||
extern int __freadable (FILE *__fp) __THROW;
|
||||
extern int __freadable (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
/* Return non-zero value iff stream FP is not opened read-only. */
|
||||
extern int __fwritable (FILE *__fp) __THROW;
|
||||
extern int __fwritable (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
|
||||
/* Return non-zero value iff the stream FP is line-buffered. */
|
||||
extern int __flbf (FILE *__fp) __THROW;
|
||||
extern int __flbf (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
|
||||
/* Discard all pending buffered I/O on the stream FP. */
|
||||
extern void __fpurge (FILE *__fp) __THROW;
|
||||
extern void __fpurge (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
/* Return amount of output in bytes pending on a stream FP. */
|
||||
extern size_t __fpending (FILE *__fp) __THROW;
|
||||
extern size_t __fpending (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
/* Flush all line-buffered files. */
|
||||
extern void _flushlbf (void);
|
||||
|
||||
|
||||
/* Set locking status of stream FP to TYPE. */
|
||||
extern int __fsetlocking (FILE *__fp, int __type) __THROW;
|
||||
extern int __fsetlocking (FILE *__fp, int __type) __THROW __nonnull ((1));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in New Issue