Changeset 08f747e in mainline for uspace/lib/c/include/stdio.h


Ignore:
Timestamp:
2010-11-26T21:49:30Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8e423a2d, dac43be
Parents:
e4dbfda (diff), da55d5b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/stdio.h

    re4dbfda r08f747e  
    4141#include <adt/list.h>
    4242
     43#ifndef NVERIFY_PRINTF
     44
     45#define PRINTF_ATTRIBUTE(start, end) \
     46        __attribute__((format(gnu_printf, start, end)))
     47
     48#else /* NVERIFY_PRINTF */
     49
     50#define PRINTF_ATTRIBUTE(start, end)
     51
     52#endif /* NVERIFY_PRINTF */
     53
    4354#define EOF  (-1)
    4455
     
    149160
    150161/* Formatted string output functions */
    151 extern int fprintf(FILE *, const char*, ...);
     162extern int fprintf(FILE *, const char*, ...)
     163    PRINTF_ATTRIBUTE(2, 3);
    152164extern int vfprintf(FILE *, const char *, va_list);
    153165
    154 extern int printf(const char *, ...);
     166extern int printf(const char *, ...)
     167    PRINTF_ATTRIBUTE(1, 2);
    155168extern int vprintf(const char *, va_list);
    156169
    157 extern int snprintf(char *, size_t , const char *, ...);
    158 extern int asprintf(char **, const char *, ...);
     170extern int snprintf(char *, size_t , const char *, ...)
     171    PRINTF_ATTRIBUTE(3, 4);
     172extern int asprintf(char **, const char *, ...)
     173    PRINTF_ATTRIBUTE(2, 3);
    159174extern int vsnprintf(char *, size_t, const char *, va_list);
    160175
Note: See TracChangeset for help on using the changeset viewer.