mirror of
https://github.com/reactos/reactos.git
synced 2025-05-22 18:45:00 +00:00
[HHPCOMP]
- Fix VC10 build - Don't cast function pointers - Fix warnings svn path=/trunk/; revision=68697
This commit is contained in:
parent
602935e1cb
commit
120c2fc6ad
2 changed files with 8 additions and 14 deletions
|
@ -30,10 +30,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if !defined(__GNUC__) || defined(__MINGW32__)
|
||||
typedef int (*__compar_fn_t)(const void *, const void *);
|
||||
#endif
|
||||
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
@ -70,10 +66,6 @@ void chmc_pmgi_destroy(struct chmcPmgiChunkNode *node);
|
|||
void chmc_entries_free(struct chmcFile *chm);
|
||||
void chmc_entry_destroy(struct chmcTreeNode *node);
|
||||
int chmc_add_tree(struct chmcFile *chm, const char *dir);
|
||||
static int _add_tree_file( struct dir_tree_global *dtg,
|
||||
struct dir_tree_local *dtl );
|
||||
static int _add_tree_dir(struct dir_tree_global *dtg,
|
||||
struct dir_tree_local *dtl);
|
||||
struct chmcTreeNode *chmc_add_file(struct chmcFile *chm, const char *filename,
|
||||
UInt16 prefixlen, int sect_id, UChar *buf,
|
||||
UInt64 len);
|
||||
|
@ -92,7 +84,7 @@ int chmc_reset_table_done(struct chmcFile *chm);
|
|||
void chmc_pmgl_done(struct chmcFile *chm);
|
||||
|
||||
void chmc_entries_qsort(struct chmcFile *chm);
|
||||
static int _entry_cmp(struct chmcTreeNode **pa, struct chmcTreeNode **pb);
|
||||
static int _entry_cmp(const void *pva, const void *pvb);
|
||||
|
||||
struct chmcSection *chmc_section_lookup(struct chmcFile *chm, int id);
|
||||
|
||||
|
@ -1209,12 +1201,14 @@ void chmc_entries_qsort(struct chmcFile *chm)
|
|||
}
|
||||
|
||||
qsort(chm->sort_entries, chm->entries_num, sizeof(struct chmcTreeNode *),
|
||||
(__compar_fn_t) _entry_cmp);
|
||||
_entry_cmp);
|
||||
}
|
||||
|
||||
static int _entry_cmp(struct chmcTreeNode **pa, struct chmcTreeNode **pb)
|
||||
static int _entry_cmp(const void *pva, const void *pvb)
|
||||
{
|
||||
struct chmcTreeNode *a = *pa, *b = *pb;
|
||||
const struct chmcTreeNode * const *pa = pva;
|
||||
const struct chmcTreeNode * const *pb = pvb;
|
||||
const struct chmcTreeNode *a = *pa, *b = *pb;
|
||||
|
||||
return strcmp( &a->name[a->prefixlen], &b->name[b->prefixlen] );
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ struct chmcErr
|
|||
};
|
||||
|
||||
static struct chmcErr chmc_err = {
|
||||
.code = CHMC_NOERR,
|
||||
.msg[0] = '\0',
|
||||
CHMC_NOERR,
|
||||
'\0',
|
||||
};
|
||||
|
||||
void chmcerr_clean(void) {
|
||||
|
|
Loading…
Reference in a new issue