Bug 75170 - sprintf format mistake in systemd-cryptsetup-generator
Summary: sprintf format mistake in systemd-cryptsetup-generator
Status: RESOLVED NOTOURBUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium trivial
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-18 19:14 UTC by Aleksey Vorona
Modified: 2014-02-18 20:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Aleksey Vorona 2014-02-18 19:14:21 UTC
cppcheck output:
[src/cryptsetup/cryptsetup-generator.c:149]: (error) fprintf format string has 2 parameters but only 1 are given.

fprintf(f, "After=%1$s\nRequires=%1$s\n", dd);
Comment 1 Lennart Poettering 2014-02-18 20:12:22 UTC
This appears to be a bug in cppcheck. The format string actually references the same passed argument twice with explicit numbering. It appears that cppecheck doesn't understand the "%1$" specifiers correctly.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.