+Sun May 19 20:25:05 CDT 2002 Adam Heath <doogie@debian.org>
+
+ * lib/showpkg.c, lib/utils.c, optlib/long-options.c, main/archives.c,
+ main/configure.c, main/main.c, main/query.c, optlib/long-options.c,
+ lib/showpkg.c, lib/utils.c: Several more gcc -W<foo> fixes.
+
Sun May 19 18:48:39 CDT 2002 Adam Heath <doogie@debian.org>
* debian/rules: Fix overzealous running of autoheader for every build.
};
-static struct lstitem* alloclstitem() {
+static struct lstitem* alloclstitem(void) {
struct lstitem* buf;
buf=(struct lstitem*)malloc(sizeof(struct lstitem));
}
-static void dumpchain(struct lstitem* head) {
- while (head) {
- printf("Type: %s\n", (head->type==string) ? "string" : "field");
- printf("Width: %d\n", head->width);
- printf("Data: %s\n", head->data);
- printf("\n");
- head=head->next;
- }
-}
+#define dumpchain(head) {\
+ const struct lstitem* ptr = head;\
+ while (ptr) {\
+ printf("Type: %s\n", (ptr->type==string) ? "string" : "field");\
+ printf("Width: %d\n", ptr->width);\
+ printf("Data: %s\n", ptr->data);\
+ printf("\n");\
+ ptr=ptr->next;\
+ }\
+}\
void show1package(const struct lstitem* head, struct pkginfo *pkg) {
*/
#include <config.h>
+#include <dpkg.h>
/* Reimplementation of the standard ctype.h is* functions. Since gettext
* has overloaded the meaning of LC_CTYPE we can't use that to force C
static int tarobs_init= 0;
/* ensure the obstack is properly initialized */
-static void ensureobstackinit() {
+static void ensureobstackinit(void) {
if (!tarobs_init) {
obstack_init(&tar_obs);
}
/* destroy the obstack */
-static void destroyobstack() {
+static void destroyobstack(void) {
if (tarobs_init) {
obstack_free(&tar_obs, 0);
tarobs_init= 0;
(((fixbyrm->want != want_install && fixbyrm->want != want_hold) ||
does_replace(pkg,&pkg->available,fixbyrm)) &&
(!fixbyrm->installed.essential || fc_removeessential)))) {
- assert(fixbyrm->clientdata->istobe == itb_normal);
+ assert(fixbyrm->clientdata->istobe == itb_normal || fixbyrm->clientdata->istobe == itb_deconfigure);
fixbyrm->clientdata->istobe= itb_remove;
fprintf(stderr, _("dpkg: considering removing %s in favour of %s ...\n"),
fixbyrm->name, pkg->name);
static void md5hash(struct pkginfo *pkg, char **hashbuf, const char *fn);
static void copyfileperm(const char* source, const char* target);
static void showdiff(const char* old, const char* new);
-static void suspend();
+static void suspend(void);
static enum conffopt promptconfaction(const char* cfgfile, const char* realold,
const char* realnew, int useredited, int distedited,
enum conffopt what);
/* Suspend dpkg temporarily
*/
-static void suspend() {
+static void suspend(void) {
const char* s;
int pid;
(*lastpipe)->fd= v;
}
-void setforce(const struct cmdinfo *cip, const char *value) {
+static void setforce(const struct cmdinfo *cip, const char *value) {
const char *comma;
size_t l;
const struct forceinfo *fip;
*pdesc_r=pdesc; *l_r=l;
}
-static int getwidth() {
+static int getwidth(void) {
int fd;
int res;
struct winsize ws;
const char *command_name;
const char *package;
const char *version;
- void (*usage)();
+ void (*usage)(int);
{
int c;
int saved_opterr;