--- rpl/src/instructions_l3.c 2013/02/27 17:11:42 1.40 +++ rpl/src/instructions_l3.c 2013/03/20 17:11:45 1.41 @@ -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;