Skip to contentSkip to conversation

New: Misleading synposis in printf(3) for vsnprintf(3)

Bug 216461 [email protected] 1 participant 1 message Sep 8, 2022 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=216461

Bug ID: 216461
Summary: Misleading synposis in printf(3) for vsnprintf(3)
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: man-pages
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Hi!

The printf(3) page says:

```
SYNOPSIS
       #include <stdio.h>

       int printf(const char *restrict format, ...);
[...]

       #include <stdarg.h>

       int vprintf(const char *restrict format, va_list ap);
[...]
       int vsnprintf(char *restrict str, size_t size,
                   const char *restrict format, va_list ap);
```

It might just be me, but the gap between the two blocks of functions made me think that only <stdarg.h> was needed for those latter functions, even though it's needed for va_list.

Would it be appropriate to add a second #include <stdio.h> above #include <stdarg.h> to resolve the ambiguity?

Thanks!

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.