On Tue, Apr 1, 2014 at 12:40 AM, Hongxu Jia <[email protected]> wrote: > On 04/01/2014 01:30 PM, Khem Raj wrote: >> >> On Fri, Mar 28, 2014 at 2:43 AM, Hongxu Jia <[email protected]> >> wrote: >>> >>> ++ const size_t max_write = INT_MAX; >> >> I think INT_MAX is a mismatch here size_t may not be defined 'unsigned >> int' on all kind of architectures. > > > How about test the size of size_t and assigned the related MAX value: > > const size_t max_write = (sizeof(size_t) >= > sizeof(int))?INT_MAX:(sizeof(size_t) == sizeof(short))?SHRT_MAX:CHAR_MAX; >
you could use something like (size_t)-1 to denote SIZE_MAX > //Hongxu > -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
