Open zloi-user opened 4 years ago
gcc (8.3.0, 9.2.0) with the parameter "-02" ignores code "read(fd, & seed, sizeof (seed))"
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLISTDIR="\"/lib/macchanger\"" -O2 -march=native -s -pipe -c -o main.o main.c main.c: In function ‘random_seed’: main.c:101:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] 101 | read (fd, &seed, sizeof(seed)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On the second pass, it does not change the MAC address, i.e. "random ()% 255" returns the same value
if you compile with the -O0 option, the problem goes away
sorry for my english, google translator used
gcc (8.3.0, 9.2.0) with the parameter "-02" ignores code "read(fd, & seed, sizeof (seed))"
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLISTDIR="\"/lib/macchanger\"" -O2 -march=native -s -pipe -c -o main.o main.c main.c: In function ‘random_seed’: main.c:101:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] 101 | read (fd, &seed, sizeof(seed)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On the second pass, it does not change the MAC address, i.e. "random ()% 255" returns the same value
if you compile with the -O0 option, the problem goes away
sorry for my english, google translator used