--- rpl/src/instructions_i2.c 2013/02/27 17:11:42 1.48 +++ rpl/src/instructions_i2.c 2013/03/20 17:11:45 1.49 @@ -44,8 +44,8 @@ instruction_idn(struct_processus *s_etat logical1 argument_nom; logical1 variable_partagee; - unsigned long i; - unsigned long j; + integer8 i; + integer8 j; (*s_etat_processus).erreur_execution = d_ex; @@ -223,8 +223,8 @@ instruction_idn(struct_processus *s_etat } if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = - malloc((*((struct_matrice *) (*s_objet_resultat).objet)) - .nombre_lignes * sizeof(integer8 *))) == NULL) + malloc(((size_t) (*((struct_matrice *) (*s_objet_resultat) + .objet)).nombre_lignes) * sizeof(integer8 *))) == NULL) { if (variable_partagee == d_vrai) { @@ -244,9 +244,9 @@ instruction_idn(struct_processus *s_etat .nombre_lignes; i++) { if ((((integer8 **) (*((struct_matrice *) (*s_objet_resultat) - .objet)).tableau)[i] = malloc((*((struct_matrice *) - (*s_objet_resultat).objet)).nombre_colonnes * - sizeof(integer8))) == NULL) + .objet)).tableau)[i] = malloc(((size_t) + (*((struct_matrice *) (*s_objet_resultat).objet)) + .nombre_colonnes) * sizeof(integer8))) == NULL) { if (variable_partagee == d_vrai) { @@ -359,10 +359,10 @@ instruction_ifft(struct_processus *s_eta logical1 presence_longueur_fft; - unsigned long i; - unsigned long j; - unsigned long k; - unsigned long longueur_fft; + integer8 i; + integer8 j; + integer8 k; + integer8 longueur_fft; (*s_etat_processus).erreur_execution = d_ex; @@ -468,18 +468,18 @@ instruction_ifft(struct_processus *s_eta { if (presence_longueur_fft == d_faux) { - longueur_fft = pow(2, (integer4) ceil(log((real8) + longueur_fft = (integer8) pow(2, ceil(log((real8) (*((struct_vecteur *) (*s_objet_argument).objet)).taille) / log((real8) 2))); - if ((longueur_fft / ((real8) (*((struct_vecteur *) + if ((((real8) longueur_fft) / ((real8) (*((struct_vecteur *) (*s_objet_argument).objet)).taille)) == 2) { longueur_fft /= 2; } } - if ((matrice_f77 = malloc(longueur_fft * + if ((matrice_f77 = malloc(((size_t) longueur_fft) * sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; @@ -529,7 +529,7 @@ instruction_ifft(struct_processus *s_eta } nombre_lignes = 1; - nombre_colonnes = longueur_fft; + nombre_colonnes = (integer4) longueur_fft; inverse = -1; dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur); @@ -565,21 +565,20 @@ instruction_ifft(struct_processus *s_eta { if (presence_longueur_fft == d_faux) { - longueur_fft = pow(2, (integer4) ceil(log((real8) - (*((struct_matrice *) - (*s_objet_argument).objet)).nombre_colonnes) / - log((real8) 2))); + longueur_fft = (integer8) pow(2, ceil(log((real8) + (*((struct_matrice *) (*s_objet_argument).objet)) + .nombre_colonnes) / log((real8) 2))); - if ((longueur_fft / ((real8) (*((struct_matrice *) + if ((((real8) longueur_fft) / ((real8) (*((struct_matrice *) (*s_objet_argument).objet)).nombre_colonnes)) == 2) { longueur_fft /= 2; } } - if ((matrice_f77 = malloc(longueur_fft * - (*((struct_matrice *) (*s_objet_argument).objet)) - .nombre_lignes * sizeof(struct_complexe16))) == NULL) + if ((matrice_f77 = malloc(((size_t) longueur_fft) * + ((size_t) (*((struct_matrice *) (*s_objet_argument).objet)) + .nombre_lignes) * sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -655,9 +654,9 @@ instruction_ifft(struct_processus *s_eta } } - nombre_lignes = (*((struct_matrice *) (*s_objet_argument).objet)) - .nombre_lignes; - nombre_colonnes = longueur_fft; + nombre_lignes = (integer4) (*((struct_matrice *) + (*s_objet_argument).objet)).nombre_lignes; + nombre_colonnes = (integer4) longueur_fft; inverse = -1; dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur); @@ -684,8 +683,8 @@ instruction_ifft(struct_processus *s_eta longueur_fft; if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = - malloc((*((struct_matrice *) (*s_objet_resultat).objet)) - .nombre_lignes * sizeof(struct_complexe16 *))) == NULL) + malloc(((size_t) (*((struct_matrice *) (*s_objet_resultat) + .objet)).nombre_lignes) * sizeof(struct_complexe16 *))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; return; @@ -696,8 +695,8 @@ instruction_ifft(struct_processus *s_eta { if ((((struct_complexe16 **) (*((struct_matrice *) (*s_objet_resultat).objet)).tableau)[i] = - malloc((*((struct_matrice *) - (*s_objet_resultat).objet)).nombre_colonnes * + malloc(((size_t) (*((struct_matrice *) + (*s_objet_resultat).objet)).nombre_colonnes) * sizeof(struct_complexe16))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; @@ -771,7 +770,7 @@ instruction_input(struct_processus *s_et unsigned char *tampon; unsigned char *tampon2; - unsigned long i; + integer8 i; (*s_etat_processus).erreur_execution = d_ex; @@ -851,7 +850,7 @@ instruction_input(struct_processus *s_et ptr_l++; } - if ((tampon2 = malloc((strlen(tampon) + 1 + i) * + if ((tampon2 = malloc((strlen(tampon) + 1 + ((size_t) i)) * sizeof(unsigned char))) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; @@ -1203,7 +1202,7 @@ instruction_int(struct_processus *s_etat if ((*s_objet_argument_1).type == INT) { - precision = (*((integer8 *) (*s_objet_argument_1).objet)); + precision = (real8) (*((integer8 *) (*s_objet_argument_1).objet)); } else if ((*s_objet_argument_1).type == REL) {