Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-CFLAGS = -W -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS = -W -Wwrite-strings -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PROGS = fio
SCRIPTS = fio_generate_plots
OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
PROGS = fio
SCRIPTS = fio_generate_plots
OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
int thread_number = 0;
int shm_id = 0;
int temp_stall_ts;
int thread_number = 0;
int shm_id = 0;
int temp_stall_ts;
-char *fio_inst_prefix = _INST_PREFIX;
+const char *fio_inst_prefix = _INST_PREFIX;
static volatile int startup_sem;
static volatile int startup_sem;
extern int terse_output;
extern FILE *f_out;
extern FILE *f_err;
extern int terse_output;
extern FILE *f_out;
extern FILE *f_err;
-extern char *fio_inst_prefix;
+extern const char *fio_inst_prefix;
extern int temp_stall_ts;
extern struct thread_data *threads;
extern int temp_stall_ts;
extern struct thread_data *threads;
*/
static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
{
*/
static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
{
- char *ddir_str[] = { "read", "write", "randread", "randwrite",
- "rw", NULL, "randrw" };
+ const char *ddir_str[] = { "read", "write", "randread", "randwrite",
+ "rw", NULL, "randrw" };
struct stat sb;
int numjobs, ddir, i;
struct fio_file *f;
struct stat sb;
int numjobs, ddir, i;
struct fio_file *f;
* Option define
*/
struct fio_option {
* Option define
*/
struct fio_option {
enum fio_opt_type type;
unsigned int off1;
unsigned int off2;
enum fio_opt_type type;
unsigned int off1;
unsigned int off2;
static void show_ddir_status(struct thread_data *td, struct group_run_stats *rs,
int ddir)
{
static void show_ddir_status(struct thread_data *td, struct group_run_stats *rs,
int ddir)
{
- char *ddir_str[] = { "read ", "write" };
+ const char *ddir_str[] = { "read ", "write" };
unsigned long min, max;
unsigned long long bw;
double mean, dev;
unsigned long min, max;
unsigned long long bw;
double mean, dev;