[LTP] [PATCH] syscalls/fcntl: add new test for open file description locks

Cyril Hrubis chrubis@suse.cz
Thu Apr 7 10:26:04 CEST 2016


Hi!
> >> +		++res[(int)buf[0]];
> >                           ^
> > 			Do we really need to cast it to int here?
> 
> 
> Otherwise gcc would complain  "warning: array subscript has type ?char?"

Hmm, perhaps the compiler tries to warn you that char may be signed or
unsigned depending on a architecture and compiler implementation. Does
the warning goes away if you declare the buf as a unsigned char?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list