Ti scrivo solo il pezzo di codice riguardante le due funzioni con i warning(in rosso solo le riche corrispondenti ai due warning):
void readintmp() {
FILE *fili;
int temp;
long filesize;
/* allocated memory for the bcasts */
char *allocmem;
int *savealloc;
char *encryptedmem;
char *decryptedmem;
char *pointi;
char scheissbuffer[100000];
char scheissbuffer2[100000];
char sicken[1000];
char *sickpoint;
albcasts=0;
bcastcount_alive=0;
if ((fili=fopen("tmp","r"))!=0)
{
/* needed for the blowfish encryption of the bcasts */
encryptedmem=(char*)&scheissbuffer;
decryptedmem=(char*)&scheissbuffer2;
fseek(fili,0,2);
fgetpos(fili,&filesize);
fseek(fili,0,0);
fread(encryptedmem,filesize,1,fili);
memset(decryptedmem,0,100000);
memcpy(decryptedmem,decrypt_string(SALT,encryptedm em),filesize);
count=0;
bcastcount_alive=0;
while (*decryptedmem!='\0') {
sickpoint=(char*)&sicken;
while (*decryptedmem!=' ') {
*sickpoint++=*decryptedmem++;
}
*sickpoint='\0';
decryptedmem++;
replies[count]=inet_addr(sicken);
bcastcount_alive++;
albcasts++;
count++;
}
fclose(fili);
}
}
/* read all the bcasts into memory */
void readinbcasts()
{
FILE *fili;
int temp;
long filesize;
/* allocated memory for the bcasts */
char *allocmem;
int *savealloc;
char *encryptedmem;
char *decryptedmem;
char *pointi;
char scheissbuffer[100000];
char scheissbuffer2[100000];
char sicken[1000];
char *sickpoint;
bcastcount=0;
if ((fili=fopen(BCASTFILENAME,"r"))!=0)
{
/* needed for the blowfish encryption of the bcasts */
encryptedmem=(char*)&scheissbuffer;
decryptedmem=(char*)&scheissbuffer2;
fseek(fili,0,2);
fgetpos(fili,&filesize);
fseek(fili,0,0);
fread(encryptedmem,filesize,1,fili);
memset(decryptedmem,0,100000);
memcpy(decryptedmem,decrypt_string(SALT,encryptedm em),filesize);
count=0;
bcastcount=0;
while (*decryptedmem!='\0') {
sickpoint=(char*)&sicken;
while (*decryptedmem!=' ') {
*sickpoint++=*decryptedmem++;
}
*sickpoint='\0';
decryptedmem++;
bcasts[count]=inet_addr(sicken);
// printf("%s\n",sicken);
bcastcount++;
count++;
}
fclose(fili);
}
}
Ti ripeto che ho lo stesso problema in diversi programmi,anzi qui i warning soono solo 2!!
Grazie