Changeset b5143bd in mainline for uspace/lib/c


Ignore:
Timestamp:
2015-06-06T01:50:56Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0453261
Parents:
94e46c9 (diff), 87a2f9b (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:

mainline changes

Location:
uspace/lib/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/getopt.c

    r94e46c9 rb5143bd  
    9595 * Compute the greatest common divisor of a and b.
    9696 */
    97 static int
    98 gcd(a, b)
    99         int a;
    100         int b;
     97static int gcd(int a, int b)
    10198{
    10299        int c;
    103 
     100       
    104101        c = a % b;
    105102        while (c != 0) {
     
    108105                c = a % b;
    109106        }
    110            
     107       
    111108        return b;
    112109}
     
    117114 * in each block).
    118115 */
    119 static void
    120 permute_args(panonopt_start, panonopt_end, opt_end, nargv)
    121         int panonopt_start;
    122         int panonopt_end;
    123         int opt_end;
    124         char **nargv;
     116static void permute_args(int panonopt_start, int panonopt_end, int opt_end,
     117    char **nargv)
    125118{
    126119        int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
     
    157150 *  Returns -2 if -- is found (can be long option or end of options marker).
    158151 */
    159 static int
    160 getopt_internal(nargc, nargv, options)
    161         int nargc;
    162         char **nargv;
    163         const char *options;
     152static int getopt_internal(int nargc, char **nargv, const char *options)
    164153{
    165154        const char *oli;                                /* option letter list index */
     
    299288 *      Parse argc/argv argument vector.
    300289 */
    301 int
    302 getopt(nargc, nargv, options)
    303         int nargc;
    304         char * const *nargv;
    305         const char *options;
     290int getopt(int nargc, char * const *nargv, const char *options)
    306291{
    307292        int retval;
     
    332317 *      Parse argc/argv argument vector.
    333318 */
    334 int
    335 getopt_long(nargc, nargv, options, long_options, idx)
    336         int nargc;
    337         char * const *nargv;
    338         const char *options;
    339         const struct option *long_options;
    340         int *idx;
     319int getopt_long(int nargc, char * const *nargv, const char *options,
     320    const struct option *long_options, int *idx)
    341321{
    342322        int retval;
  • uspace/lib/c/include/malloc.h

    r94e46c9 rb5143bd  
    4444extern void *memalign(const size_t align, const size_t size)
    4545    __attribute__((malloc));
    46 extern void *realloc(const void *addr, const size_t size);
     46extern void *realloc(const void *addr, const size_t size)
     47    __attribute__((warn_unused_result));
    4748extern void free(const void *addr);
    4849extern void *heap_check(void);
  • uspace/lib/c/include/mem.h

    r94e46c9 rb5143bd  
    4040
    4141extern void *memset(void *, int, size_t)
     42    __attribute__((nonnull(1)))
    4243    ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns");
    4344extern void *memcpy(void *, const void *, size_t)
     45    __attribute__((nonnull(1, 2)))
    4446    ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns");
    45 extern void *memmove(void *, const void *, size_t);
    46 extern int memcmp(const void *, const void *, size_t);
     47extern void *memmove(void *, const void *, size_t)
     48    __attribute__((nonnull(1, 2)));
     49extern int memcmp(const void *, const void *, size_t)
     50    __attribute__((nonnull(1, 2)));
    4751
    4852#endif
  • uspace/lib/c/include/task.h

    r94e46c9 rb5143bd  
    6060extern int task_spawn(task_id_t *, task_wait_t *, const char *path, int,
    6161    va_list ap);
    62 extern int task_spawnl(task_id_t *, task_wait_t *, const char *path, ...);
     62extern int task_spawnl(task_id_t *, task_wait_t *, const char *path, ...)
     63    __attribute__((sentinel));
    6364
    6465extern int task_setup_wait(task_id_t, task_wait_t *);
Note: See TracChangeset for help on using the changeset viewer.