summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2018-06-21 22:15:41 -0400
committerJason Woodward2018-06-21 22:18:30 -0400
commitb7284eaf8437001c971d93e9e1867827929e05b7 (patch)
tree568fdeb89c86aeaea2330da813e82b789ece3027
parentc62c2b4ac3d3f475c4a5f29d6040c3e2c3509315 (diff)
downloadslapt-src-b7284eaf8437001c971d93e9e1867827929e05b7.tar.gz
build fixes
-rw-r--r--ChangeLog1
-rw-r--r--src/Makefile.am2
-rw-r--r--src/main.c5
-rw-r--r--src/source.c5
4 files changed, 7 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b65aee..a844092 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.3.3 Jun 21, 2018
+ * build fixes
* tx pull
* use c99 stdbool (libslapt compat)
diff --git a/src/Makefile.am b/src/Makefile.am
index 7a4260c..251eaa9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,5 +2,5 @@
bin_PROGRAMS = slapt-src
slapt_src_SOURCES = main.c source.c source.h
slapt_src_LDADD = $(LIBOBJS) $(LIBS)
-slapt_src_CPPFLAGS = $(CFLAGS) -Wall -ansi -pedantic
+slapt_src_CPPFLAGS = $(CFLAGS) -Wall -pedantic -Wshadow -Wstrict-overflow -fno-strict-aliasing
diff --git a/src/main.c b/src/main.c
index bdbe53d..fe15b34 100644
--- a/src/main.c
+++ b/src/main.c
@@ -435,7 +435,6 @@ int main(int argc, char *argv[])
break;
case SHOW_OPT: {
- int c;
for (i = 0; i < names->count; i++) {
slapt_src_slackbuild *sb = NULL;
slapt_list_t *parts = slapt_parse_delimited_list(names->items[i], ':');
@@ -455,8 +454,8 @@ int main(int argc, char *argv[])
printf(gettext("SlackBuild Files:\n"));
- for (c = 0; c < sb->files->count; c++) {
- printf(" %s\n", sb->files->items[c]);
+ for (int ic = 0; ic < sb->files->count; ic++) {
+ printf(" %s\n", sb->files->items[ic]);
}
if (sb->requires != NULL)
diff --git a/src/source.c b/src/source.c
index dd66329..27f0e38 100644
--- a/src/source.c
+++ b/src/source.c
@@ -756,12 +756,13 @@ int slapt_src_build_slackbuild(slapt_src_config *config, slapt_src_slackbuild *s
}
free(command);
+ command = NULL;
if (config->postcmd != NULL) {
char *filename = NULL;
if ((filename = _get_pkg_filename(sb->version, config->pkgtag)) != NULL) {
- char *command = NULL;
- int r = 0, command_len = strlen(config->postcmd) + strlen(filename) + 2;
+ r = 0;
+ command_len = strlen(config->postcmd) + strlen(filename) + 2;
command = slapt_malloc(sizeof *command * command_len);
r = snprintf(command, command_len, "%s %s", config->postcmd, filename);
if (r + 1 != command_len) {