[PATCH] cdebconf: Fix *_can_align() signatures to match the prototype
Hi all,
gcc correctly warns about a pointer mismatch assigning to
methods.can_align for newt and the generic default:
struct frontend_module {
..
bool (*can_align)(struct frontend *, struct question *);
vs.
static bool newt_can_align(struct frontend *obj)
static bool frontend_can_align(struct frontend *ui)
The attached patch fixes those two to take the additional
struct question * parameter.
Max
diff -r fce562ac73a5 debian/changelog
--- a/debian/changelog Sun May 04 15:32:01 2008 +0200
+++ b/debian/changelog Sun May 04 15:33:29 2008 +0200
@@ -7,6 +7,7 @@
[ Max Vozeler ]
* src/modules/frontend/{ncurses,slang,bogl}: Adapt to API changes made in
cdebconf 0.129 - q_get_*() and question_get_value().
+ * Fix *_can_align() function signatures to match the prototype.
-- Frans Pop <fjp@debian.org> Sun, 20 Apr 2008 18:21:40 +0200
diff -r fce562ac73a5 src/frontend.c
--- a/src/frontend.c Sun May 04 15:32:01 2008 +0200
+++ b/src/frontend.c Sun May 04 15:33:29 2008 +0200
@@ -108,7 +108,7 @@
return false;
}
-static bool frontend_can_align(struct frontend *ui)
+static bool frontend_can_align(struct frontend *ui, struct question *q)
{
return false;
}
diff -r fce562ac73a5 src/modules/frontend/newt/newt.c
--- a/src/modules/frontend/newt/newt.c Sun May 04 15:32:01 2008 +0200
+++ b/src/modules/frontend/newt/newt.c Sun May 04 15:33:29 2008 +0200
@@ -1148,7 +1148,7 @@
}
static bool
-newt_can_align(struct frontend *obj)
+newt_can_align(struct frontend *obj, struct question *q)
{
return (obj->capability & DCF_CAPB_ALIGN);
}
Reply to: