summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2017-10-01 17:01:05 +0100
committerFreeArtMan <dos21h@gmail.com>2017-10-01 17:01:05 +0100
commit385f3ef50cb142bb860281230394df7a9e6b34b5 (patch)
tree78cdd5f521134d22f9b271dd6eca2cf8607d709f
parent9cea7b90fb34deff24ba49694963cc98e3e05e49 (diff)
downloadnetbytes-385f3ef50cb142bb860281230394df7a9e6b34b5.tar.gz
netbytes-385f3ef50cb142bb860281230394df7a9e6b34b5.zip
Fixed warnings
-rw-r--r--netbytes.c18
1 files 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)&&