Browse Source

Enhancement in build + bugfixes

Yann Weber 1 year ago
parent
commit
66ace69502
4 changed files with 12 additions and 4 deletions
  1. 7
    1
      src/Makefile.am
  2. 2
    2
      src/shell_cmds.c
  3. 2
    0
      tests/samples/Makefile.am
  4. 1
    1
      tests/tests_history.c

+ 7
- 1
src/Makefile.am View File

@@ -1,5 +1,6 @@
1 1
 bin_PROGRAMS = asmsh child
2 2
 
3
+noinst_PROGRAMS = child
3 4
 noinst_LIBRARIES= libcheck_asmsh.a
4 5
 
5 6
 libcheck_asmsh_a_SOURCES = mmap_parse.c asm_env.c breakpoints.c compile.c logger.c \
@@ -7,13 +8,18 @@ libcheck_asmsh_a_SOURCES = mmap_parse.c asm_env.c breakpoints.c compile.c logger
7 8
 			   shell.c shell_cmds.c shell_sym.c \
8 9
 			   shell_cmd_breakpoint.c
9 10
 
11
+noinst_HEADERS = asmsh.h mmap_parse.h asm_env.h breakpoints.h compile.h logger.h \
12
+		completion.h history.h \
13
+		shell.h shell_cmds.h shell_sym.h syscalls.h
14
+
15
+
10 16
 asmsh_SOURCES = asmsh.c $(libcheck_asmsh_a_SOURCES)
11 17
 child_SOURCES = child.s
12 18
 
13 19
 asmsh_LDADD=child_bin.o
14 20
 asmsh_LDFLAGS=-g -O2
15 21
 
16
-AM_CFLAGS=-Wall -Werror
22
+AM_CFLAGS=-Wall -Werror -fstack-protector-strong -Wformat -Werror=format-security
17 23
 AM_CCASFLAGS=-g -O0
18 24
 child_LDFLAGS=-nostdlib
19 25
 

+ 2
- 2
src/shell_cmds.c View File

@@ -314,7 +314,7 @@ int asmsh_cmd_syscalls(asmsh_t *sh, asmsh_cmd_args_t *args)
314 314
 			printf("\n");
315 315
 			printed = ret;
316 316
 		}
317
-		printf(buf);
317
+		printf("%s", buf);
318 318
 	}
319 319
 	printf("\n");
320 320
 	return 0;
@@ -382,7 +382,7 @@ int asmsh_cmd_help_(asmsh_t *sh, asmsh_cmd_args_t *args)
382 382
 		ret += snprintf(buf+ret, 4096-ret, "  %-18s : %s\n", 
383 383
 				abuf, cmd->desc);
384 384
 	}
385
-	dprintf(2, buf);
385
+	dprintf(2, "%s", buf);
386 386
 	return 0;
387 387
 }
388 388
 

+ 2
- 0
tests/samples/Makefile.am View File

@@ -1,6 +1,8 @@
1 1
 if CHECK
2 2
 bin_PROGRAMS = asm_env_stamps
3 3
 
4
+EXTRA_DIST=procfs_pid_maps procfs_pid_maps_sm sample.history
5
+
4 6
 asm_env_stamps_SOURCES = asm_env_stamps.s
5 7
 asm_env_stamps_CCASFLAGS = -g -O0
6 8
 

+ 1
- 1
tests/tests_history.c View File

@@ -41,7 +41,7 @@ END_TEST
41 41
 START_TEST(test_save)
42 42
 {
43 43
 	// Do not test the written content, only check for segfaults
44
-	const char * const hist[]={"foo", "bar", "super history"};
44
+	const char * const hist[]={"foo", "bar", "super history", NULL};
45 45
 	save_history("/dev/null", hist);
46 46
 
47 47
 }

Loading…
Cancel
Save