--- rpl/src/instructions_l3.c 2010/08/06 15:33:01 1.12 +++ rpl/src/instructions_l3.c 2014/01/26 18:21:32 1.46 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.0.18 - Copyright (C) 1989-2010 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.17 + Copyright (C) 1989-2014 Dr. BERTRAND Joël This file is part of RPL/2. @@ -190,7 +190,7 @@ instruction_lsq(struct_processus *s_etat struct_matrice s_matrice_tampon_b; struct_matrice s_matrice_tampon_x; - unsigned long i; + integer8 i; (*s_etat_processus).erreur_execution = d_ex; @@ -288,8 +288,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(integer8 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * + sizeof(integer8 *))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -317,8 +318,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(real8 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * sizeof(real8 *))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -384,8 +386,8 @@ instruction_lsq(struct_processus *s_etat s_matrice_tampon_x.nombre_lignes; if (((*((struct_vecteur *) (*s_objet_resultat).objet)).tableau = - malloc((*((struct_vecteur *) (*s_objet_resultat).objet)).taille - * sizeof(real8))) == NULL) + malloc(((size_t) (*((struct_vecteur *) (*s_objet_resultat) + .objet)).taille) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -433,8 +435,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(integer8 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * sizeof(integer8 *))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -462,8 +465,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(real8 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * sizeof(real8 *))) + == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -491,8 +495,9 @@ instruction_lsq(struct_processus *s_etat (*s_objet_argument_2).objet)).taille; s_matrice_tampon_b.nombre_colonnes = 1; - if ((s_matrice_tampon_b.tableau = malloc(s_matrice_tampon_b - .nombre_lignes * sizeof(struct_complexe16 *))) == NULL) + if ((s_matrice_tampon_b.tableau = malloc(((size_t) + s_matrice_tampon_b.nombre_lignes) * + sizeof(struct_complexe16 *))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -570,8 +575,8 @@ instruction_lsq(struct_processus *s_etat s_matrice_tampon_x.nombre_lignes; if (((*((struct_vecteur *) (*s_objet_resultat).objet)).tableau = - malloc((*((struct_vecteur *) (*s_objet_resultat).objet)).taille - * sizeof(struct_complexe16))) == NULL) + malloc(((size_t) (*((struct_vecteur *) (*s_objet_resultat) + .objet)).taille) * sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return;