mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-05 23:48:44 +02:00
cmph: Squash a lot of gcc -Wall compiler warnings
* Functions taking no parameters need to explicitly say (void). * Mark some functions as static that are * Comment out an unused function in bdz.c * Change loop indicies "i" to be unsigned if our limit is unsigned
This commit is contained in:
@@ -107,7 +107,7 @@ static void bdz_add_edge(bdz_graph3_t * graph3, cmph_uint32 v0, cmph_uint32 v1,
|
||||
|
||||
static void bdz_dump_graph(bdz_graph3_t* graph3, cmph_uint32 nedges, cmph_uint32 nvertices)
|
||||
{
|
||||
int i;
|
||||
cmph_uint32 i;
|
||||
for(i=0;i<nedges;i++){
|
||||
printf("\nedge %d %d %d %d ",i,graph3->edges[i].vertices[0],
|
||||
graph3->edges[i].vertices[1],graph3->edges[i].vertices[2]);
|
||||
@@ -216,7 +216,7 @@ static void assigning(bdz_config_data_t *bdz, bdz_graph3_t* graph3, bdz_queue_t
|
||||
static void ranking(bdz_config_data_t *bdz);
|
||||
static cmph_uint32 rank(cmph_uint32 b, cmph_uint32 * ranktable, cmph_uint8 * g, cmph_uint32 vertex);
|
||||
|
||||
bdz_config_data_t *bdz_config_new()
|
||||
bdz_config_data_t *bdz_config_new(void)
|
||||
{
|
||||
bdz_config_data_t *bdz;
|
||||
bdz = (bdz_config_data_t *)malloc(sizeof(bdz_config_data_t));
|
||||
@@ -560,7 +560,8 @@ void bdz_load(FILE *f, cmph_t *mphf)
|
||||
}
|
||||
|
||||
|
||||
cmph_uint32 bdz_search_ph(cmph_t *mphf, const char *key, cmph_uint32 keylen)
|
||||
/*
|
||||
static cmph_uint32 bdz_search_ph(cmph_t *mphf, const char *key, cmph_uint32 keylen)
|
||||
{
|
||||
bdz_data_t *bdz = mphf->data;
|
||||
cmph_uint32 hl[3];
|
||||
@@ -572,6 +573,7 @@ cmph_uint32 bdz_search_ph(cmph_t *mphf, const char *key, cmph_uint32 keylen)
|
||||
vertex = hl[(GETVALUE(bdz->g, hl[0]) + GETVALUE(bdz->g, hl[1]) + GETVALUE(bdz->g, hl[2])) % 3];
|
||||
return vertex;
|
||||
}
|
||||
*/
|
||||
|
||||
static inline cmph_uint32 rank(cmph_uint32 b, cmph_uint32 * ranktable, cmph_uint8 * g, cmph_uint32 vertex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user