Skip to content

Commit

Permalink
[warnings] Fix warnings (paparazzi#2183)
Browse files Browse the repository at this point in the history
  • Loading branch information
dewagter committed Nov 10, 2017
1 parent 86865fd commit 0e7baf2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ test_openuas: all

# test TU Delft conf
test_tudelft: all
CONF_XML=conf/userconf/TUDELFT/tudelft_flyable_conf.xml prove tests/aircrafts/
CONF_XML=conf/userconf/tudelft/conf.xml prove tests/aircrafts/

# compiles all aircrafts in conf_tests.xml
test_examples: all
Expand Down
21 changes: 0 additions & 21 deletions sw/airborne/arch/sim/mcu_periph/i2c_arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ void i2c0_hw_init(void)
ZEROS_ERR_COUNTER(i2c0_errors);
}

void i2c0_ev_isr(void)
{
}

void i2c0_er_isr(void)
{
}
#endif

#if USE_I2C1
Expand All @@ -59,13 +52,6 @@ void i2c1_hw_init(void)
ZEROS_ERR_COUNTER(i2c1_errors);
}

void i2c1_ev_isr(void)
{
}

void i2c1_er_isr(void)
{
}
#endif

#if USE_I2C2
Expand All @@ -77,11 +63,4 @@ void i2c2_hw_init(void)
ZEROS_ERR_COUNTER(i2c2_errors);
}

void i2c2_ev_isr(void)
{
}

void i2c2_er_isr(void)
{
}
#endif
3 changes: 1 addition & 2 deletions sw/airborne/firmwares/fixedwing/main_fbw.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ void fbw_datalink_event_handle(void) {}
#endif /* FBW_DATALINK */

/********** ACTUATORS defines ************************************************/
#if defined ACTUATORS && defined INTER_MCU
void update_actuators(void);

#if defined ACTUATORS && defined INTER_MCU
void update_actuators(void)
{
if (fbw_new_actuators > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,12 +587,12 @@ static void manage_flow_features(struct image_t *img, struct opticflow_t *opticf
region_count[i][1] = i;
}
uint16_t root_regions = (uint16_t)sqrtf((float)opticflow->fast9_num_regions);
int index;
int region_index;
for (uint16_t i = 0; i < result->corner_cnt; i++) {
index = (opticflow->fast9_ret_corners[i].x * root_regions / img->w
region_index = (opticflow->fast9_ret_corners[i].x * root_regions / img->w
+ root_regions * (opticflow->fast9_ret_corners[i].y * root_regions / img->h));
index = (index < opticflow->fast9_num_regions) ? index : opticflow->fast9_num_regions - 1;
region_count[index][0]++;
region_index = (region_index < opticflow->fast9_num_regions) ? region_index : opticflow->fast9_num_regions - 1;
region_count[region_index][0]++;
}

//sorting region_count array according to first column (number of corners).
Expand Down Expand Up @@ -895,7 +895,7 @@ static int cmp_flow(const void *a, const void *b)
*/
static int cmp_array(const void *a, const void *b)
{
const uint16_t *pa = *(const uint16_t **)a;
const uint16_t *pb = *(const uint16_t **)b;
uint16_t *pa = *(uint16_t **)a;
uint16_t *pb = *(uint16_t **)b;
return pa[0] - pb[0];
}
4 changes: 3 additions & 1 deletion sw/simulator/nps/nps_ins_vectornav.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@ struct VectornavData {

struct VectornavData vn_data;

void ins_vectornav_init(void);
void ins_vectornav_init(void) {}
void ins_vectornav_event(void);
void ins_vectornav_event(void) {}

/**
* Calculates the 16-bit CRC for the given ASCII or binary message.
* The CRC is calculated over the packet starting just after the sync byte (not including the sync byte)
* and ending at the end of payload.
*/
unsigned short vn_calculate_crc(unsigned char data[], unsigned int length)
static short vn_calculate_crc(unsigned char data[], unsigned int length)
{
unsigned int i;
unsigned short crc = 0;
Expand Down

0 comments on commit 0e7baf2

Please sign in to comment.