diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2007-10-15 17:38:22 -0700 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2007-11-05 14:02:59 +0100 |
commit | 0fa7180bcd256667ff5b45c681c2694400999111 (patch) | |
tree | e41fe67b08bc373b7ac1451c8b14953fa61658f7 /text-utils | |
parent | 32f7216b4c480e140a035c92319e527120d26616 (diff) | |
download | util-linux-old-0fa7180bcd256667ff5b45c681c2694400999111.tar.gz |
more: cleanup gcc warnings
Fix strict gcc warnings that come from using:
("-Wall -Wp,-D_FORTIFY_SOURCE=2")
more.c:185: warning: passing argument 1 of 'setupterm' discards qualifiers from pointer target type
more.c:205: warning: passing argument 1 of 'tparm' discards qualifiers from pointer target type
more.c:812: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in signedness
more.c:931: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in signedness
more.c:1285: warning: pointer targets in passing argument 1 of 'ttyin' differ in signedness
more.c:1486: warning: pointer targets in passing argument 1 of 'ttyin' differ in signedness
more.c:1879: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in signedness
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Diffstat (limited to 'text-utils')
-rw-r--r-- | text-utils/more.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/text-utils/more.c b/text-utils/more.c index 5dcae7b8..8266c058 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -99,7 +99,7 @@ void erasep (register int col); void show (register char ch); void set_tty(void); void reset_tty(void); -void ttyin (unsigned char buf[], register int nmax, char pchar); +void ttyin (char buf[], register int nmax, char pchar); int number(char *cmd); int readch (void); int get_line(register FILE *f, int *length); @@ -180,7 +180,7 @@ my_putstring(char *s) { } static void -my_setupterm(const char *term, int fildes, int *errret) { +my_setupterm(char *term, int fildes, int *errret) { setupterm(term, fildes, errret); } @@ -200,7 +200,7 @@ my_tgetstr(char *s, char *ss) { } static char * -my_tgoto(const char *cap, int col, int row) { +my_tgoto(char *cap, int col, int row) { return tparm(cap, col, row); } @@ -218,7 +218,7 @@ my_putstring(char *s) { } static void -my_setupterm(const char *term, int fildes, int *errret) { +my_setupterm(char *term, int fildes, int *errret) { *errret = tgetent(tcbuffer, term); } @@ -238,7 +238,7 @@ my_tgetstr(char *s, char *ss) { } static char * -my_tgoto(const char *cap, int col, int row) { +my_tgoto(char *cap, int col, int row) { return tgoto(cap, col, row); } @@ -784,7 +784,7 @@ int get_line(register FILE *f, int *length) wchar_t wc; int wc_width; mbstate_t state, state_bak; /* Current status of the stream. */ - unsigned char mbc[MB_LEN_MAX]; /* Buffer for one multibyte char. */ + char mbc[MB_LEN_MAX]; /* Buffer for one multibyte char. */ size_t mblength; /* Byte length of multibyte char. */ size_t mbc_pos = 0; /* Postion of the MBC. */ int use_mbc_buffer_flag = 0; /* If 1, mbc has data. */ @@ -1848,8 +1848,8 @@ static char *CARAT = "^"; else \ putserr(BS); -void ttyin (unsigned char buf[], register int nmax, char pchar) { - unsigned char *sp; +void ttyin (char buf[], register int nmax, char pchar) { + char *sp; int c; int slash = 0; int maxlen; |