stardis-green

Post-processing of green functions
git clone git://git.meso-star.fr/stardis-green.git
Log | Files | Refs | README | LICENSE

commit 9c7655d1f2fc5294da24335fc31caa460817102f
parent 3d7ff7fdf160d33adbab7eba68dccd3d94292e36
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri,  1 May 2020 20:04:03 +0200

Fix warnings

Diffstat:
Msrc/green-compute.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/green-compute.c b/src/green-compute.c @@ -13,6 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#define _POSIX_C_SOURCE 200112L /* strtok_r */ + #include "green-compute.h" #include "green-types.h" @@ -189,8 +191,8 @@ green_compute_1 FOR_EACH(i, 0, green->counts.ok_count) { const struct sample* sample = green->samples + i; unsigned id = sample->header.end_id; - enum description_type type = green->descriptions[id].type; - ASSERT(DESC_IS_T(type) || DESC_IS_H(type)); + ASSERT(DESC_IS_T(green->descriptions[id].type) + || DESC_IS_H(green->descriptions[id].type)); ASSERT(id <= green->counts.desc_count); /* Ambient ID is desc_count */ ASSERT(green->table[id].end_defined); Ti = green->table[id].end_value; @@ -199,8 +201,7 @@ green_compute_1 const double w = sample->pw_weights[j]; id = sample->pw_ids[j]; ASSERT(id < green->counts.desc_count); - type = green->descriptions[id].type; - ASSERT(DESC_IS_MEDIUM(type)); + ASSERT(DESC_IS_MEDIUM(green->descriptions[id].type)); ASSERT(green->table[id].other_defined); Ti += w * green->table[id].other_value; } @@ -208,8 +209,7 @@ green_compute_1 const double w = sample->fx_weights[j]; id = sample->fx_ids[j]; ASSERT(id < green->counts.desc_count); - type = green->descriptions[id].type; - ASSERT(DESC_IS_F(type)); + ASSERT(DESC_IS_F(green->descriptions[id].type)); ASSERT(green->table[id].other_defined); Ti += w * green->table[id].other_value; }