Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-04-08 21:55:30 -0500
committerDan McGee <dan@archlinux.org>2012-04-08 21:55:30 -0500
commitd158dde30c378acc8e88d5208aa837f92331af9e (patch)
treeb99456c7b765becdb5bab3869af5a2e512026562 /src
parent31091963edaa505d00642aecb9950ce087a40b73 (diff)
parentb729ed01093312cef7ce48d07b13e225b25446db (diff)
Merge remote-tracking branch 'dave/buildsys'
Oh god, what are we thinking thinking merging this. Hopefully this works with only a few follow-up patches necessary.
Diffstat (limited to 'src')
-rw-r--r--src/pacman/Makefile.am2
-rw-r--r--src/pacman/conf.c6
-rw-r--r--src/pacman/pacman.c9
-rw-r--r--src/pacman/sync.c4
-rw-r--r--src/pacman/util.c2
-rw-r--r--src/util/Makefile.am4
6 files changed, 14 insertions, 13 deletions
diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am
index 9a92fd6b..c8ce9773 100644
--- a/src/pacman/Makefile.am
+++ b/src/pacman/Makefile.am
@@ -21,7 +21,7 @@ AM_CPPFLAGS = \
-imacros $(top_builddir)/config.h \
-I$(top_srcdir)/lib/libalpm
-AM_CFLAGS = -pedantic -D_GNU_SOURCE
+AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS)
if USE_GIT_VERSION
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 4c3d063b..2632d18f 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -202,14 +202,14 @@ static int download_with_xfercommand(const char *url, const char *localpath,
cleanup:
/* restore the old cwd if we have it */
if(cwdfd >= 0) {
- int ret;
+ int close_ret;
if(fchdir(cwdfd) != 0) {
pm_printf(ALPM_LOG_ERROR, _("could not restore working directory (%s)\n"),
strerror(errno));
}
do {
- ret = close(cwdfd);
- } while(ret == -1 && errno == EINTR);
+ close_ret = close(cwdfd);
+ } while(close_ret == -1 && errno == EINTR);
}
if(ret == -1) {
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 1e6797c9..73d5be94 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -808,12 +808,13 @@ int main(int argc, char *argv[])
/* we support reading targets from stdin if a cmdline parameter is '-' */
if(!isatty(fileno(stdin)) && alpm_list_find_str(pm_targets, "-")) {
- size_t current_size = PATH_MAX, i = 0;
+ size_t current_size = PATH_MAX;
char *line = malloc(current_size);
/* remove the '-' from the list */
pm_targets = alpm_list_remove_str(pm_targets, "-", NULL);
+ i = 0;
while((line[i] = (char)fgetc(stdin)) != EOF) {
if(isspace((unsigned char)line[i])) {
/* avoid adding zero length arg when multiple spaces separate args */
@@ -885,13 +886,13 @@ int main(int argc, char *argv[])
#endif
if(config->verbose > 0) {
- alpm_list_t *i;
+ alpm_list_t *j;
printf("Root : %s\n", alpm_option_get_root(config->handle));
printf("Conf File : %s\n", config->configfile);
printf("DB Path : %s\n", alpm_option_get_dbpath(config->handle));
printf("Cache Dirs: ");
- for(i = alpm_option_get_cachedirs(config->handle); i; i = alpm_list_next(i)) {
- printf("%s ", (const char *)i->data);
+ for(j = alpm_option_get_cachedirs(config->handle); j; j = alpm_list_next(j)) {
+ printf("%s ", (const char *)j->data);
}
printf("\n");
printf("Lock File : %s\n", alpm_option_get_lockfile(config->handle));
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 5165dca1..9c17f45f 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -307,12 +307,12 @@ static int sync_cleancache(int level)
static int sync_synctree(int level, alpm_list_t *syncs)
{
alpm_list_t *i;
- int success = 0, ret;
+ unsigned int success = 0;
for(i = syncs; i; i = alpm_list_next(i)) {
alpm_db_t *db = i->data;
- ret = alpm_db_update((level < 2 ? 0 : 1), db);
+ int ret = alpm_db_update((level < 2 ? 0 : 1), db);
if(ret < 0) {
pm_printf(ALPM_LOG_ERROR, _("failed to update %s (%s)\n"),
alpm_db_get_name(db), alpm_strerror(alpm_errno(config->handle)));
diff --git a/src/pacman/util.c b/src/pacman/util.c
index f2ab163b..be8fc308 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -258,7 +258,7 @@ void indentprint(const char *str, unsigned short indent, unsigned short cols)
{
wchar_t *wcstr;
const wchar_t *p;
- int len, cidx;
+ size_t len, cidx;
if(!str) {
return;
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index e386d950..463abf7f 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -17,7 +17,7 @@ AM_CPPFLAGS = \
-imacros $(top_builddir)/config.h \
-I$(top_srcdir)/lib/libalpm
-AM_CFLAGS = -pedantic -D_GNU_SOURCE
+AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS)
cleanupdelta_SOURCES = cleanupdelta.c
cleanupdelta_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la
@@ -35,6 +35,6 @@ testpkg_SOURCES = testpkg.c
testpkg_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la
vercmp_SOURCES = vercmp.c
-vercmp_LDADD = $(top_builddir)/lib/libalpm/version.lo
+vercmp_LDADD = $(top_builddir)/lib/libalpm/libalpm_la-version.lo
# vim:set ts=2 sw=2 noet: