@@ -905,7 +905,7 @@ static int findmatch(char *string, char *name)
*/
uint getgpiopin(char *vars, char *pin_name, uint def_pin)
{
- char name[] = "gpioXXXX";
+ char name[sizeof("gpioXXXX")];
char *val;
uint pin;
@@ -374,7 +374,7 @@ static int doDevConfig(struct comedi_device *dev, struct comedi_devconfig *it)
/* Loop through all comedi devices specified on the command-line,
building our device list */
for (i = 0; i < COMEDI_NDEVCONFOPTS && (!i || it->options[i]); ++i) {
- char file[] = "/dev/comediXXXXXX";
+ char file[sizeof("/dev/comediXXXXXX")];
int minor = it->options[i];
struct comedi_device *d;
int sdev = -1, nchans, tmp;
@@ -34,6 +34,6 @@
*/
-char pmcc4_OSSI_release[] = "$Release: PMCC4_3_1B, Copyright (c) 2008 One Stop Systems$";
+static const char pmcc4_OSSI_release[] = "$Release: PMCC4_3_1B, Copyright (c) 2008 One Stop Systems$";
/*** End-of-File ***/
@@ -92,7 +92,7 @@ EXPORT_SYMBOL(go7007_read_addr);
static int go7007_load_encoder(struct go7007 *go)
{
const struct firmware *fw_entry;
- char fw_name[] = "go7007fw.bin";
+ static const char fw_name[] = "go7007fw.bin";
void *bounce;
int fw_len, rv = 0;
u16 intr_val, intr_data;
@@ -704,7 +704,7 @@ static void mdp_drv_init(void)
#ifdef MSM_FB_ENABLE_DBGFS
{
struct dentry *root;
- char sub_name[] = "mdp";
+ static const char sub_name[] = "mdp";
root = msm_fb_get_debugfs_root();
if (root != NULL) {
@@ -253,7 +253,7 @@ static int show_debug_level(char *page, char **start, off_t offset,
static int store_debug_level(struct file *file, const char *buffer,
unsigned long count, void *data)
{
- char buf[] = "0x00000000";
+ char buf[sizeof("0x00000000")];
unsigned long len = min(sizeof(buf) - 1, (u32)count);
char *p = (char *)buf;
unsigned long val;
@@ -256,7 +256,7 @@ static int show_debug_level(char *page, char **start, off_t offset,
static int store_debug_level(struct file *file, const char *buffer,
unsigned long count, void *data)
{
- char buf[] = "0x00000000";
+ char buf[sizeof("0x00000000")];
unsigned long len = min_t(unsigned long, sizeof(buf) - 1, count);
char *p = (char *)buf;
unsigned long val;
@@ -548,7 +548,7 @@ int dcd_get_objects(struct dcd_manager *hdcd_mgr,
struct cod_libraryobj *lib = NULL;
u32 ul_addr = 0; /* Used by cod_get_section */
u32 ul_len = 0; /* Used by cod_get_section */
- char seps[] = ":, ";
+ static const char seps[] = ":, ";
char *token = NULL;
struct dsp_uuid dsp_uuid_obj;
s32 object_type;
@@ -1050,7 +1050,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
struct dcd_genericobj *gen_obj)
{
int status = 0;
- char seps[] = ", ";
+ static const char seps[] = ", ";
char *psz_cur;
char *token;
s32 token_len = 0;
@@ -1419,7 +1419,7 @@ static int get_dep_lib_info(struct dcd_manager *hdcd_mgr,
u32 ul_addr = 0; /* Used by cod_get_section */
u32 ul_len = 0; /* Used by cod_get_section */
u32 dw_data_size = COD_MAXPATHLENGTH;
- char seps[] = ", ";
+ static const char seps[] = ", ";
char *token = NULL;
bool get_uuids = (dep_lib_uuids != NULL);
u16 dep_libs = 0;