--- rpl/src/instructions_a1.c 2013/03/16 11:31:41 1.43 +++ rpl/src/instructions_a1.c 2013/03/20 17:11:44 1.44 @@ -794,10 +794,10 @@ instruction_abs(struct_processus *s_etat struct_objet *s_objet_argument; struct_objet *s_objet_resultat; - unsigned long i; - unsigned long j; - unsigned long k; - unsigned long nombre_elements; + integer8 i; + integer8 j; + integer8 k; + integer8 nombre_elements; void *accumulateur; @@ -944,8 +944,8 @@ instruction_abs(struct_processus *s_etat return; } - if ((accumulateur = malloc((*(((struct_vecteur *) - (*s_objet_argument).objet))).taille * sizeof(real8))) == NULL) + if ((accumulateur = malloc(((size_t) (*(((struct_vecteur *) + (*s_objet_argument).objet))).taille) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -986,8 +986,8 @@ instruction_abs(struct_processus *s_etat return; } - if ((accumulateur = malloc((*(((struct_vecteur *) - (*s_objet_argument).objet))).taille * sizeof(real8))) == NULL) + if ((accumulateur = malloc(((size_t) (*(((struct_vecteur *) + (*s_objet_argument).objet))).taille) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -1028,8 +1028,8 @@ instruction_abs(struct_processus *s_etat return; } - if ((accumulateur = malloc((*(((struct_vecteur *) - (*s_objet_argument).objet))).taille * sizeof(real8))) == NULL) + if ((accumulateur = malloc(((size_t) (*(((struct_vecteur *) + (*s_objet_argument).objet))).taille) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -1069,10 +1069,10 @@ instruction_abs(struct_processus *s_etat return; } - if ((accumulateur = malloc((nombre_elements = + if ((accumulateur = malloc(((size_t) (nombre_elements = (*(((struct_matrice *) (*s_objet_argument).objet))) .nombre_lignes * (*(((struct_matrice *) (*s_objet_argument) - .objet))).nombre_colonnes) * sizeof(real8))) == NULL) + .objet))).nombre_colonnes)) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -1084,11 +1084,11 @@ instruction_abs(struct_processus *s_etat for(j = 0; j < (*(((struct_matrice *) (*s_objet_argument).objet))) .nombre_colonnes; j++) { - ((real8 *) accumulateur)[k++] = - ((integer8 **) (*((struct_matrice *) + ((real8 *) accumulateur)[k++] = (real8) + (((integer8 **) (*((struct_matrice *) (*s_objet_argument).objet)).tableau)[i][j] * ((integer8 **) (*((struct_matrice *) - (*s_objet_argument).objet)).tableau)[i][j]; + (*s_objet_argument).objet)).tableau)[i][j]); } } @@ -1117,10 +1117,10 @@ instruction_abs(struct_processus *s_etat return; } - if ((accumulateur = malloc((nombre_elements = + if ((accumulateur = malloc(((size_t) (nombre_elements = (*(((struct_matrice *) (*s_objet_argument).objet))) .nombre_lignes * (*(((struct_matrice *) (*s_objet_argument) - .objet))).nombre_colonnes) * sizeof(real8))) == NULL) + .objet))).nombre_colonnes)) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -1165,10 +1165,10 @@ instruction_abs(struct_processus *s_etat return; } - if ((accumulateur = malloc((nombre_elements = + if ((accumulateur = malloc(((size_t) (nombre_elements = (*(((struct_matrice *) (*s_objet_argument).objet))) .nombre_lignes * (*(((struct_matrice *) (*s_objet_argument) - .objet))).nombre_colonnes) * sizeof(real8))) == NULL) + .objet))).nombre_colonnes)) * sizeof(real8))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return;