Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Nov 19, 2014 Kbuild

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 42da5c8b2cdd53427145b623293bc5b915fb5f05:

Fix some shadow warnings for some gcc variants (2014-11-12 11:11:20 -0700)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to 21750a254b5481f78ac3c6697754abf3cfa63e89:

Kill off -Wshadow again (2014-11-18 20:14:23 -0700)

----------------------------------------------------------------
Jens Axboe (2):
verify: allow empty/no trigger file
Kill off -Wshadow again

 Makefile |    2 +-
 init.c   |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

---

Diff of recent changes:

Makefile +1 -1
index b7c1645..8a28f62 100644
@@ -17,7 +17,7 @@ endif
 DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
 CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL $(DEBUGFLAGS)
 OPTFLAGS= -O3 -g -ffast-math
-CFLAGS	= -std=gnu99 -Wwrite-strings -Wall -Wshadow -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS)
+CFLAGS	= -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS)
 LIBS	+= -lm $(EXTLIBS)
 PROGS	= fio
 SCRIPTS = tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio
init.c +4 -2
index c7fdcdd..108f2b8 100644
@@ -2212,8 +2212,10 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
 			}
 
 			sz = split - optarg;
-			trigger_file = calloc(1, sz + 1);
-			strncpy(trigger_file, optarg, sz);
+			if (sz) {
+				trigger_file = calloc(1, sz + 1);
+				strncpy(trigger_file, optarg, sz);
+			}
 
 			split++;
 			cmd = trigger_cmd = strdup(split);