From 385f3ef50cb142bb860281230394df7a9e6b34b5 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sun, 1 Oct 2017 17:01:05 +0100 Subject: Fixed warnings --- netbytes.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/netbytes.c b/netbytes.c index 68a04e3..1f8433b 100644 --- a/netbytes.c +++ b/netbytes.c @@ -285,7 +285,7 @@ uint8_t *nb_create( netbyte_store *store ) if ( store->count < 1 ) return NULL; - store->size == 0; + store->size = 0; /* precalc needed size starting from zero not metter what */ store->size += sizeof(__NBT_SIZE); @@ -483,7 +483,7 @@ int nb_free(netbyte_store *store) } case NBT_U32: { - nb_u32 *u32 = (nb_u32 *)val; + //nb_u32 *u32 = (nb_u32 *)val; //free(u32); //u32 = NULL; store->types[i].nb_val=NULL; @@ -505,7 +505,7 @@ int nb_load( netbyte_store *store, uint8_t *data ) __NBT_TYPED type; int iter=1; uint8_t *c = data; - int count; + //int count; if ( store == NULL ) { @@ -530,7 +530,7 @@ int nb_load( netbyte_store *store, uint8_t *data ) return 0; } - count = 0; + //count = 0; memset( store, 0, sizeof(netbyte_store) ); while ( iter ) { @@ -677,7 +677,7 @@ int nb_count( netbyte_store *store ) int nb_type( netbyte_store *store, int count, __NBT_TYPED **type ) { - __NBT_TYPED nbt; + //__NBT_TYPED nbt; if ( store == NULL ) { return -1; @@ -715,7 +715,7 @@ int nb_val( netbyte_store *store, int count, __nb_type **type ) int nb_fread( netbyte_store *store, int fd) { __NBT_SIZE size; - ssize_t ret; + //ssize_t ret; off_t old_seek; uint8_t *nb; @@ -834,7 +834,7 @@ int nb_match(netbyte_store *store, nb_tok_arr *pattern) { printf("[%d]\n",i); __NBT_TYPED type = store->types[i].type; - void *val = store->types[i].nb_val; + //void *val = store->types[i].nb_val; nb_tok pat_tok = pattern->tok[i]; int eq = 0; @@ -843,7 +843,7 @@ int nb_match(netbyte_store *store, nb_tok_arr *pattern) case NBT_U8: { printf("NBT_U8\n"); - nb_u8 *u8 = (nb_u8 *)val; + //nb_u8 *u8 = (nb_u8 *)val; if ((pat_tok.type_size == 8)&& (pat_tok.sign == SIGN_UNSIGNED)&& @@ -857,7 +857,7 @@ int nb_match(netbyte_store *store, nb_tok_arr *pattern) case NBT_U8ARRAY: { printf("NBT_U8ARRAY\n"); - nb_u8arr *u8arr = (nb_u8arr *)val; + //nb_u8arr *u8arr = (nb_u8arr *)val; if ((pat_tok.type_size == 8)&& (pat_tok.sign == SIGN_UNSIGNED)&& -- cgit v1.2.3