diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2010-07-03 14:11:03 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2010-07-03 14:11:03 +0200 |
commit | a52a00a3d745844419d93209ddec1c4236aed22a (patch) | |
tree | 0e7f9120852778ed89c9b8efcc7a939a590974b6 /lib-src | |
parent | 35d99b72205541bd4a41e2f98410607f620470a2 (diff) | |
download | emacs-a52a00a3d745844419d93209ddec1c4236aed22a.tar.gz |
Fix invalid cast
* sorted-doc.c (cmpdoc): Fix signature.
(qsort_compare): Delete.
(main): Remove cast.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog | 6 | ||||
-rw-r--r-- | lib-src/sorted-doc.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 939f3f219ec..e80ca8a4cc2 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2010-07-03 Andreas Schwab <schwab@linux-m68k.org> + + * sorted-doc.c (cmpdoc): Fix signature. + (qsort_compare): Delete. + (main): Remove cast. + 2010-07-03 Juanma Barranquero <lekktu@gmail.com> * ebrowse.c (match_qualified_namespace_alias): Check for null pointer. diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c index 2c138dc348c..595633b76d8 100644 --- a/lib-src/sorted-doc.c +++ b/lib-src/sorted-doc.c @@ -103,15 +103,15 @@ xstrdup (char *str) /* Comparison function for qsort to call. */ int -cmpdoc (DOCSTR **a, DOCSTR **b) +cmpdoc (const void *va, const void *vb) { + DOCSTR *const *a = va; + DOCSTR *const *b = vb; register int val = strcmp ((*a)->name, (*b)->name); if (val) return val; return (*a)->type - (*b)->type; } -typedef int (*qsort_compare) (const void *, const void *); - enum state { WAITING, BEG_NAME, NAME_GET, BEG_DESC, DESC_GET @@ -228,7 +228,7 @@ main (void) /* sort the array by name; within each name, by type */ - qsort ((char*)array, cnt, sizeof (DOCSTR*), (qsort_compare)cmpdoc); + qsort ((char*)array, cnt, sizeof (DOCSTR*), cmpdoc); /* write the output header */ |