Bug 75170

Summary: sprintf format mistake in systemd-cryptsetup-generator
Product: systemd Reporter: Aleksey Vorona <voronaam>
Component: generalAssignee: systemd-bugs
Status: RESOLVED NOTOURBUG QA Contact: systemd-bugs
Severity: trivial    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

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.