mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Always specify arguement type in function delcarations
Always declare a function with (void) rather than () when we expect no arguements. Fixes all warnings with -Wstrict-prototypes. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
5776090055
commit
a611879318
@ -97,69 +97,69 @@ typedef int (*alpm_cb_fetch)(const char *url, const char *localpath,
|
|||||||
* Options
|
* Options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
alpm_cb_log alpm_option_get_logcb();
|
alpm_cb_log alpm_option_get_logcb(void);
|
||||||
void alpm_option_set_logcb(alpm_cb_log cb);
|
void alpm_option_set_logcb(alpm_cb_log cb);
|
||||||
|
|
||||||
alpm_cb_download alpm_option_get_dlcb();
|
alpm_cb_download alpm_option_get_dlcb(void);
|
||||||
void alpm_option_set_dlcb(alpm_cb_download cb);
|
void alpm_option_set_dlcb(alpm_cb_download cb);
|
||||||
|
|
||||||
alpm_cb_fetch alpm_option_get_fetchcb();
|
alpm_cb_fetch alpm_option_get_fetchcb(void);
|
||||||
void alpm_option_set_fetchcb(alpm_cb_fetch cb);
|
void alpm_option_set_fetchcb(alpm_cb_fetch cb);
|
||||||
|
|
||||||
alpm_cb_totaldl alpm_option_get_totaldlcb();
|
alpm_cb_totaldl alpm_option_get_totaldlcb(void);
|
||||||
void alpm_option_set_totaldlcb(alpm_cb_totaldl cb);
|
void alpm_option_set_totaldlcb(alpm_cb_totaldl cb);
|
||||||
|
|
||||||
const char *alpm_option_get_root();
|
const char *alpm_option_get_root(void);
|
||||||
int alpm_option_set_root(const char *root);
|
int alpm_option_set_root(const char *root);
|
||||||
|
|
||||||
const char *alpm_option_get_dbpath();
|
const char *alpm_option_get_dbpath(void);
|
||||||
int alpm_option_set_dbpath(const char *dbpath);
|
int alpm_option_set_dbpath(const char *dbpath);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_cachedirs();
|
alpm_list_t *alpm_option_get_cachedirs(void);
|
||||||
int alpm_option_add_cachedir(const char *cachedir);
|
int alpm_option_add_cachedir(const char *cachedir);
|
||||||
void alpm_option_set_cachedirs(alpm_list_t *cachedirs);
|
void alpm_option_set_cachedirs(alpm_list_t *cachedirs);
|
||||||
int alpm_option_remove_cachedir(const char *cachedir);
|
int alpm_option_remove_cachedir(const char *cachedir);
|
||||||
|
|
||||||
const char *alpm_option_get_logfile();
|
const char *alpm_option_get_logfile(void);
|
||||||
int alpm_option_set_logfile(const char *logfile);
|
int alpm_option_set_logfile(const char *logfile);
|
||||||
|
|
||||||
const char *alpm_option_get_lockfile();
|
const char *alpm_option_get_lockfile(void);
|
||||||
/* no set_lockfile, path is determined from dbpath */
|
/* no set_lockfile, path is determined from dbpath */
|
||||||
|
|
||||||
int alpm_option_get_usesyslog();
|
int alpm_option_get_usesyslog(void);
|
||||||
void alpm_option_set_usesyslog(int usesyslog);
|
void alpm_option_set_usesyslog(int usesyslog);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_noupgrades();
|
alpm_list_t *alpm_option_get_noupgrades(void);
|
||||||
void alpm_option_add_noupgrade(const char *pkg);
|
void alpm_option_add_noupgrade(const char *pkg);
|
||||||
void alpm_option_set_noupgrades(alpm_list_t *noupgrade);
|
void alpm_option_set_noupgrades(alpm_list_t *noupgrade);
|
||||||
int alpm_option_remove_noupgrade(const char *pkg);
|
int alpm_option_remove_noupgrade(const char *pkg);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_noextracts();
|
alpm_list_t *alpm_option_get_noextracts(void);
|
||||||
void alpm_option_add_noextract(const char *pkg);
|
void alpm_option_add_noextract(const char *pkg);
|
||||||
void alpm_option_set_noextracts(alpm_list_t *noextract);
|
void alpm_option_set_noextracts(alpm_list_t *noextract);
|
||||||
int alpm_option_remove_noextract(const char *pkg);
|
int alpm_option_remove_noextract(const char *pkg);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_ignorepkgs();
|
alpm_list_t *alpm_option_get_ignorepkgs(void);
|
||||||
void alpm_option_add_ignorepkg(const char *pkg);
|
void alpm_option_add_ignorepkg(const char *pkg);
|
||||||
void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs);
|
void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs);
|
||||||
int alpm_option_remove_ignorepkg(const char *pkg);
|
int alpm_option_remove_ignorepkg(const char *pkg);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_ignoregrps();
|
alpm_list_t *alpm_option_get_ignoregrps(void);
|
||||||
void alpm_option_add_ignoregrp(const char *grp);
|
void alpm_option_add_ignoregrp(const char *grp);
|
||||||
void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps);
|
void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps);
|
||||||
int alpm_option_remove_ignoregrp(const char *grp);
|
int alpm_option_remove_ignoregrp(const char *grp);
|
||||||
|
|
||||||
const char *alpm_option_get_arch();
|
const char *alpm_option_get_arch(void);
|
||||||
void alpm_option_set_arch(const char *arch);
|
void alpm_option_set_arch(const char *arch);
|
||||||
|
|
||||||
int alpm_option_get_usedelta();
|
int alpm_option_get_usedelta(void);
|
||||||
void alpm_option_set_usedelta(int usedelta);
|
void alpm_option_set_usedelta(int usedelta);
|
||||||
|
|
||||||
int alpm_option_get_checkspace();
|
int alpm_option_get_checkspace(void);
|
||||||
void alpm_option_set_checkspace(int checkspace);
|
void alpm_option_set_checkspace(int checkspace);
|
||||||
|
|
||||||
pmdb_t *alpm_option_get_localdb();
|
pmdb_t *alpm_option_get_localdb(void);
|
||||||
alpm_list_t *alpm_option_get_syncdbs();
|
alpm_list_t *alpm_option_get_syncdbs(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Install reasons -- ie, why the package was installed
|
* Install reasons -- ie, why the package was installed
|
||||||
@ -407,9 +407,9 @@ typedef void (*alpm_trans_cb_conv)(pmtransconv_t, void *, void *,
|
|||||||
/* Transaction Progress callback */
|
/* Transaction Progress callback */
|
||||||
typedef void (*alpm_trans_cb_progress)(pmtransprog_t, const char *, int, int, int);
|
typedef void (*alpm_trans_cb_progress)(pmtransprog_t, const char *, int, int, int);
|
||||||
|
|
||||||
int alpm_trans_get_flags();
|
int alpm_trans_get_flags(void);
|
||||||
alpm_list_t * alpm_trans_get_add();
|
alpm_list_t * alpm_trans_get_add(void);
|
||||||
alpm_list_t * alpm_trans_get_remove();
|
alpm_list_t * alpm_trans_get_remove(void);
|
||||||
int alpm_trans_init(pmtransflag_t flags,
|
int alpm_trans_init(pmtransflag_t flags,
|
||||||
alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv,
|
alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv,
|
||||||
alpm_trans_cb_progress cb_progress);
|
alpm_trans_cb_progress cb_progress);
|
||||||
|
@ -131,7 +131,7 @@ int _package_changelog_close(const pmpkg_t *pkg, void *fp)
|
|||||||
* lets us only initialize an operations struct once which can always be
|
* lets us only initialize an operations struct once which can always be
|
||||||
* accessed by this method.
|
* accessed by this method.
|
||||||
*/
|
*/
|
||||||
static struct pkg_operations *get_file_pkg_ops()
|
static struct pkg_operations *get_file_pkg_ops(void)
|
||||||
{
|
{
|
||||||
static struct pkg_operations *file_pkg_ops = NULL;
|
static struct pkg_operations *file_pkg_ops = NULL;
|
||||||
/* determine whether our static file_pkg_ops struct has been initialized */
|
/* determine whether our static file_pkg_ops struct has been initialized */
|
||||||
|
@ -66,7 +66,7 @@ typedef struct _pmhandle_t {
|
|||||||
/* global handle variable */
|
/* global handle variable */
|
||||||
extern pmhandle_t *handle;
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
pmhandle_t *_alpm_handle_new();
|
pmhandle_t *_alpm_handle_new(void);
|
||||||
void _alpm_handle_free(pmhandle_t *handle);
|
void _alpm_handle_free(pmhandle_t *handle);
|
||||||
|
|
||||||
#endif /* _ALPM_HANDLE_H */
|
#endif /* _ALPM_HANDLE_H */
|
||||||
|
@ -63,8 +63,8 @@ int _alpm_makepath(const char *path);
|
|||||||
int _alpm_makepath_mode(const char *path, mode_t mode);
|
int _alpm_makepath_mode(const char *path, mode_t mode);
|
||||||
int _alpm_copyfile(const char *src, const char *dest);
|
int _alpm_copyfile(const char *src, const char *dest);
|
||||||
char *_alpm_strtrim(char *str);
|
char *_alpm_strtrim(char *str);
|
||||||
int _alpm_lckmk();
|
int _alpm_lckmk(void);
|
||||||
int _alpm_lckrm();
|
int _alpm_lckrm(void);
|
||||||
int _alpm_unpack_single(const char *archive, const char *prefix, const char *fn);
|
int _alpm_unpack_single(const char *archive, const char *prefix, const char *fn);
|
||||||
int _alpm_unpack(const char *archive, const char *prefix, alpm_list_t *list, int breakfirst);
|
int _alpm_unpack(const char *archive, const char *prefix, alpm_list_t *list, int breakfirst);
|
||||||
int _alpm_rmrf(const char *path);
|
int _alpm_rmrf(const char *path);
|
||||||
|
@ -571,7 +571,7 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static alpm_list_t *syncfirst() {
|
static alpm_list_t *syncfirst(void) {
|
||||||
alpm_list_t *i, *res = NULL;
|
alpm_list_t *i, *res = NULL;
|
||||||
|
|
||||||
for(i = config->syncfirst; i; i = alpm_list_next(i)) {
|
for(i = config->syncfirst; i; i = alpm_list_next(i)) {
|
||||||
|
@ -54,7 +54,7 @@ int reverse = 0;
|
|||||||
int unique = 0;
|
int unique = 0;
|
||||||
char *dbpath = NULL;
|
char *dbpath = NULL;
|
||||||
|
|
||||||
static int alpm_local_init()
|
static int alpm_local_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user