Merge pull request #790 from nvt/fix-netdb-warnings

Avoid compilation warnings in Antelope.
This commit is contained in:
Nicolas Tsiftes 2014-09-05 20:37:52 +02:00
commit af5dcc628a
2 changed files with 3 additions and 3 deletions

View file

@ -586,7 +586,6 @@ derive_relation(lvm_instance_t *p, derivation_t *local_derivations)
node_type_t type; node_type_t type;
operand_t operand[2]; operand_t operand[2];
int i; int i;
int var;
int variable_id; int variable_id;
operand_value_t *value; operand_value_t *value;
derivation_t *derivation; derivation_t *derivation;
@ -640,11 +639,9 @@ derive_relation(lvm_instance_t *p, derivation_t *local_derivations)
if(operand[1].type == LVM_VARIABLE) { if(operand[1].type == LVM_VARIABLE) {
return DERIVATION_ERROR; return DERIVATION_ERROR;
} }
var = 0;
variable_id = operand[0].value.id; variable_id = operand[0].value.id;
value = &operand[1].value; value = &operand[1].value;
} else { } else {
var = 1;
variable_id = operand[1].value.id; variable_id = operand[1].value.id;
value = &operand[0].value; value = &operand[0].value;
} }

View file

@ -36,6 +36,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include "contiki.h" #include "contiki.h"
#include "dev/serial-line.h" #include "dev/serial-line.h"
@ -110,6 +111,7 @@ buffer_db_data(const char *format, ...)
return len; return len;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#if !PREPARE_DB
static void static void
take_sample(void) take_sample(void)
{ {
@ -123,6 +125,7 @@ take_sample(void)
printf("DB insertion failed\n"); printf("DB insertion failed\n");
} }
} }
#endif /* !PREPARE_DB */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void static void
stop_handler(void *ptr) stop_handler(void *ptr)