forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
format-security: move static strings to const
While examining output from trial builds with -Wformat-security enabled, many strings were found that should be defined as "const", or as a char array instead of char pointer. This makes some static analysis easier, by producing fewer false positives. As these are all trivial changes, it seemed best to put them all in a single patch rather than chopping them up per maintainer. Link: http://lkml.kernel.org/r/20170405214711.GA5711@beast Signed-off-by: Kees Cook <[email protected]> Acked-by: Jes Sorensen <[email protected]> [runner.c] Cc: Tony Lindgren <[email protected]> Cc: Russell King <[email protected]> Cc: "Maciej W. Rozycki" <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Sean Paul <[email protected]> Cc: David Airlie <[email protected]> Cc: Yisen Zhuang <[email protected]> Cc: Salil Mehta <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: James Hogan <[email protected]> Cc: Paul Burton <[email protected]> Cc: Matt Redfearn <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Mugunthan V N <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Jarod Wilson <[email protected]> Cc: Florian Westphal <[email protected]> Cc: Antonio Quartulli <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Kejian Yan <[email protected]> Cc: Daode Huang <[email protected]> Cc: Qianqian Xie <[email protected]> Cc: Philippe Reynes <[email protected]> Cc: Colin Ian King <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Christian Gromm <[email protected]> Cc: Andrey Shvetsov <[email protected]> Cc: Jason Litzinger <[email protected]> Cc: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
Showing
19 changed files
with
31 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,8 +42,8 @@ | |
*/ | ||
|
||
static char version[] = "atarilance.c: v1.3 04/04/96 " | ||
"[email protected]\n"; | ||
static const char version[] = "atarilance.c: v1.3 04/04/96 " | ||
"[email protected]\n"; | ||
|
||
#include <linux/netdevice.h> | ||
#include <linux/etherdevice.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,8 @@ | |
*/ | ||
|
||
static char *version = "sun3lance.c: v1.2 1/12/2001 Sam Creasey ([email protected])\n"; | ||
static const char version[] = | ||
"sun3lance.c: v1.2 1/12/2001 Sam Creasey ([email protected])\n"; | ||
|
||
#include <linux/module.h> | ||
#include <linux/stddef.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ | |
local_irq_{dis,en}able() | ||
*/ | ||
|
||
static char *version = | ||
static const char version[] = | ||
"cs89x0.c:v1.02 11/26/96 Russell Nelson <[email protected]>\n"; | ||
|
||
/* ======================= configure the driver here ======================= */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -444,7 +444,7 @@ static inline __u16 sonic_rra_get(struct net_device* dev, int entry, | |
(entry * SIZEOF_SONIC_RR) + offset); | ||
} | ||
|
||
static const char *version = | ||
static const char version[] = | ||
"sonic.c:v0.92 20.9.98 [email protected]\n"; | ||
|
||
#endif /* SONIC_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,8 @@ MODULE_AUTHOR("Jes Sorensen <[email protected]>"); | |
MODULE_DESCRIPTION("Essential RoadRunner HIPPI driver"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
static char version[] = "rrunner.c: v0.50 11/11/2002 Jes Sorensen ([email protected])\n"; | ||
static const char version[] = | ||
"rrunner.c: v0.50 11/11/2002 Jes Sorensen ([email protected])\n"; | ||
|
||
|
||
static const struct net_device_ops rr_netdev_ops = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters