From: Randy Dunlap <randy.dunlap@xxxxxxxxxx> 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@xxxxxxxxxx> --- text-utils/more.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- util-linux-ng-2.13.orig/text-utils/more.c +++ util-linux-ng-2.13/text-utils/more.c @@ -100,7 +100,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); @@ -181,7 +181,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); } @@ -201,7 +201,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); } @@ -219,7 +219,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); } @@ -239,7 +239,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); } @@ -785,7 +785,7 @@ int get_line(register FILE *f, int *leng 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. */ @@ -1849,8 +1849,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; - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html