summaryrefslogtreecommitdiff
path: root/cesar/ce
diff options
context:
space:
mode:
authordufour2009-09-22 10:58:55 +0000
committerdufour2009-09-22 10:58:55 +0000
commita5fb5e4927ca70887187bec9a5a07650d69b9abf (patch)
tree7f366777e6d0f7ac54516faebe6cd3aa8d45ee03 /cesar/ce
parent2077193dc1874d298b20b55a5ad029aae25376c9 (diff)
* ce:
- fix warnings when building with optimized for size flag. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@5657 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/ce')
-rw-r--r--cesar/ce/rx/bitloading/src/initial.c3
-rw-r--r--cesar/ce/rx/cp/src/mme.c4
-rw-r--r--cesar/ce/tx/src/mme.c6
3 files changed, 8 insertions, 5 deletions
diff --git a/cesar/ce/rx/bitloading/src/initial.c b/cesar/ce/rx/bitloading/src/initial.c
index d837436380..bbe209e9ae 100644
--- a/cesar/ce/rx/bitloading/src/initial.c
+++ b/cesar/ce/rx/bitloading/src/initial.c
@@ -139,7 +139,7 @@ ce_rx_bl_initial_optimized (u64 ber_pt, tonemask_info_t *tonemask,
/* Until we reach the limit. */
uint pos = 0;
u32 *tone_word;
- u8 mod;
+ s8 mod = -1;
while (ber_pt * tm->bits_per_symbol >= ber_weighted_sum)
{
/* Get the modulation of the lowest BER impact. */
@@ -166,6 +166,7 @@ ce_rx_bl_initial_optimized (u64 ber_pt, tonemask_info_t *tonemask,
/* Next one. */
pos++;
}
+ dbg_assert (mod != -1);
/* Remove last one. */
tm->bits_per_symbol -= CE_BIT_PER_MOD[mod];
tonemap_write_tone_to_word (tone_word, opti[pos - 1].carrier_index,
diff --git a/cesar/ce/rx/cp/src/mme.c b/cesar/ce/rx/cp/src/mme.c
index 72d230359c..6395eef34b 100644
--- a/cesar/ce/rx/cp/src/mme.c
+++ b/cesar/ce/rx/cp/src/mme.c
@@ -269,7 +269,7 @@ ce_rx_mme_send_cm_chan_est_ind (cp_t *ctx, cp_sta_t *sta, tonemaps_t *tms,
bitstream_write (&mme->bitstream, 0, 16);
/* Write tone map in RLE. */
- u8 modulation;
+ s8 modulation = -1;
s8 prev_modulation = -1;
u16 cbd_length = 0;
u8 count = 0;
@@ -317,6 +317,8 @@ ce_rx_mme_send_cm_chan_est_ind (cp_t *ctx, cp_sta_t *sta, tonemaps_t *tms,
}
}
TONEMAP_READ_END;
+ dbg_assert (modulation != -1);
+ dbg_assert (prev_modulation != -1);
/* Let's write last modulation. */
if (count < 3)
{
diff --git a/cesar/ce/tx/src/mme.c b/cesar/ce/tx/src/mme.c
index 439bf74758..40aca40934 100644
--- a/cesar/ce/tx/src/mme.c
+++ b/cesar/ce/tx/src/mme.c
@@ -262,7 +262,7 @@ ce_tx_cm_chan_est_ind_receive_tonemap (cp_t *ctx, bitstream_t *mme_bitstream,
/* Read number of entry in the Tone Map. */
u16 cbd_len = bitstream_read (mme_bitstream, 16);
- s8 modulation;
+ s8 modulation = -1;
/* Initialize counter of bit per symbol. */
tonemap->bits_per_symbol = 0;
/* Compacted tone map using RLE? */
@@ -426,7 +426,7 @@ ce_tx_cm_tm_update_ind_receive_tonemap (cp_t *ctx, bitstream_t *mme_bitstream,
tonemap_copy (new_tone_map, old_tone_map);
/* Index of the tone to modify. */
- u16 tone_index_to_change;
+ u16 tone_index_to_change = 0;
/* Current index in the tone map (starting at zero without masked
tone). */
u16 tone_index_cur = 0;
@@ -434,7 +434,7 @@ ce_tx_cm_tm_update_ind_receive_tonemap (cp_t *ctx, bitstream_t *mme_bitstream,
u8 modulation;
/* Number of tone changed. */
u16 tone_changed_count = 0;
- bool work_done;
+ bool work_done = false;
TONEMAP_READ_WRITE_BEGIN (new_tone_map, ctx->ce_tx.tonemask,
modulation)