mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Add -pedantic flag to pacman (frontend) CFLAGS
Now that we got rid of the ERR and WARN macros, compilation with -pedantic turned on works with only minor changes. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
8d46cf6651
commit
7bbcaaaae9
@ -10,7 +10,7 @@ localedir = $(datadir)/locale
|
|||||||
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
|
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
|
||||||
INCLUDES = -I$(top_srcdir)/lib/libalpm
|
INCLUDES = -I$(top_srcdir)/lib/libalpm
|
||||||
|
|
||||||
AM_CFLAGS = -D_GNU_SOURCE
|
AM_CFLAGS = -pedantic -D_GNU_SOURCE
|
||||||
|
|
||||||
pacman_SOURCES = \
|
pacman_SOURCES = \
|
||||||
add.c \
|
add.c \
|
||||||
|
@ -232,6 +232,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* callback to handle questions from libalpm transactions (yes/no) */
|
/* callback to handle questions from libalpm transactions (yes/no) */
|
||||||
|
/* TODO this is one of the worst ever functions written. void *data ? wtf */
|
||||||
void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
|
void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
|
||||||
void *data3, int *response)
|
void *data3, int *response)
|
||||||
{
|
{
|
||||||
@ -247,7 +248,7 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
|
|||||||
}
|
}
|
||||||
} else if(data2) {
|
} else if(data2) {
|
||||||
/* TODO we take this route based on data2 being not null? WTF */
|
/* TODO we take this route based on data2 being not null? WTF */
|
||||||
snprintf(str, LOG_STR_LEN, _(":: %1$s requires %2$s from IgnorePkg. Install %2$s? [Y/n] "),
|
snprintf(str, LOG_STR_LEN, _(":: %s requires installing %s from IgnorePkg. Install anyway? [Y/n] "),
|
||||||
alpm_pkg_get_name(data1),
|
alpm_pkg_get_name(data1),
|
||||||
alpm_pkg_get_name(data2));
|
alpm_pkg_get_name(data2));
|
||||||
*response = yesno(str);
|
*response = yesno(str);
|
||||||
@ -435,11 +436,17 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent,
|
|||||||
case PM_TRANS_PROGRESS_ADD_START:
|
case PM_TRANS_PROGRESS_ADD_START:
|
||||||
case PM_TRANS_PROGRESS_UPGRADE_START:
|
case PM_TRANS_PROGRESS_UPGRADE_START:
|
||||||
case PM_TRANS_PROGRESS_REMOVE_START:
|
case PM_TRANS_PROGRESS_REMOVE_START:
|
||||||
|
/* old way of doing it, but ISO C does not recognize it
|
||||||
printf("(%2$*1$d/%3$*1$d) %4$s %6$-*5$.*5$s", digits, remain, howmany,
|
printf("(%2$*1$d/%3$*1$d) %4$s %6$-*5$.*5$s", digits, remain, howmany,
|
||||||
opr, pkglen, pkgname);
|
opr, pkglen, pkgname);*/
|
||||||
|
printf("(%*d/%*d) %s %-*.*s", digits, remain, digits, howmany,
|
||||||
|
opr, pkglen, pkglen, pkgname);
|
||||||
break;
|
break;
|
||||||
case PM_TRANS_PROGRESS_CONFLICTS_START:
|
case PM_TRANS_PROGRESS_CONFLICTS_START:
|
||||||
|
/* old way of doing it, but ISO C does not recognize it
|
||||||
printf("(%2$*1$d/%3$*1$d) %5$-*4$s", digits, remain, howmany,
|
printf("(%2$*1$d/%3$*1$d) %5$-*4$s", digits, remain, howmany,
|
||||||
|
textlen, opr);*/
|
||||||
|
printf("(%*d/%*d) %-*s", digits, remain, digits, howmany,
|
||||||
textlen, opr);
|
textlen, opr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@ bin_PROGRAMS = vercmp testpkg
|
|||||||
|
|
||||||
INCLUDES = -I$(top_srcdir)/lib/libalpm
|
INCLUDES = -I$(top_srcdir)/lib/libalpm
|
||||||
|
|
||||||
|
AM_CFLAGS = -pedantic
|
||||||
|
|
||||||
vercmp_SOURCES = vercmp.c
|
vercmp_SOURCES = vercmp.c
|
||||||
vercmp_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la
|
vercmp_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user