> "Michael Kerrisk (man-pages)" <mtk.manpages@xxxxxxxxx> hat am 3. August 2018 > um 16:13 geschrieben: > > > On 07/27/2018 04:22 PM, Jakub Wilk wrote: > > * Göran Häggsjö <goran.haggsjo@xxxxxxxxxx>, 2018-07-27, 14:51: > >> PTREAD_ATTR_INIT (3) > >> > >> the prinf at line 6o or so > >> > >> <pre> > >> a = ptread_attr_guardsize(attr, §v); > >> if (s != 0) > >> handle_error_en(s, “pthread_attr_getguardsize”); > >> printf(“%s:Guard size = %d butes\n”, prefix, v); > >> </pre> > >> > >> The ‘%d' above should be changed to ‘%lu’ since it is an unsigned long > >> integer. > > > > The type of this variable is actually size_t (which happens to be > > typedef'ed to unsigned int some architectures, but unsigned long on > > others). The correct directive for size_t is "%zu". > > maybe its obvious but i do not see it: the example code above returns a and checks for s is that intentional ? re, wh > > Thanks, Göran and Jakub. I changed the directive to "%zu". > > Cheers, > > Michael > > -- > Michael Kerrisk > Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ > Linux/UNIX System Programming Training: http://man7.org/training/ > -- > To unsubscribe from this list: send the line "unsubscribe linux-man" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html