Changeset 2027

Show
Ignore:
Timestamp:
02/17/07 06:08:41 (5 years ago)
Author:
tg
Message:

fix pedantic gcc warnings (with about 500 bytes of command line warning flags¹)

¹) do you really want to know?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/tools/paxmirabilis/fgetln.c

    r1686 r2027  
    2424 */ 
    2525 
    26 #define _GNU_SOURCE 
    2726#include <sys/types.h> 
    2827#include <sys/cdefs.h> 
     
    3130 
    3231#ifdef __GLIBC__ 
    33 ssize_t getline(char **lineptr, size_t *n, FILE *stream); 
     32ssize_t getline(char **, size_t *, FILE *); 
     33char *fgetln(FILE *, size_t *); 
    3434 
    3535char * 
    36 fgetln (stream, len) 
    37         FILE *stream; 
    38         size_t *len; 
     36fgetln(FILE *stream, size_t *len) 
    3937{ 
    4038        char *line=NULL; 
     
    4341        while (nread == 1) { 
    4442                nread = getline (&line, len, stream); 
    45                 if (nread == -1) 
     43                if (nread == (size_t)-1) 
    4644                        return NULL; 
    4745        } 
  • trunk/freewrt/tools/paxmirabilis/strlfun.c

    r1686 r2027  
    8383#endif 
    8484 
     85#ifndef _STRLCPY_DEFNS 
    8586size_t strlcat(char *, const char *, size_t); 
    8687size_t strlcpy(char *, const char *, size_t); 
     88#endif 
    8789 
    8890#if !defined(HAVE_STRLCAT) || (HAVE_STRLCAT == 0) 
  • trunk/freewrt/tools/paxmirabilis/strmode.c

    r217 r2027  
    3232#include <sys/stat.h> 
    3333#include <string.h> 
     34 
     35void strmode(mode_t, char *); 
    3436 
    3537void