zamaudio / intelmetool

My tool for working with Intel Management Engine - RETIRED REPO (see coreboot for new upstream)
https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/master/util/intelmetool
Other
156 stars 25 forks source link

Make warnings: variable 'csr' set but not used, pointer from integer without cast #17

Open ProBackup-nl opened 6 years ago

ProBackup-nl commented 6 years ago
gcc -Wall -O0 -g -I. -c me.c  -o me.o
me.c: In function 'mei_dump':
me.c:63:18: warning: variable 'csr' set but not used [-Wunused-but-set-variable]
  struct mei_csr *csr;
                  ^~~
gcc -Wall -O0 -g -I. -c mmap.c  -o mmap.o
mmap.c: In function 'map_physical_exact':
mmap.c:11:26: warning: passing argument 1 of 'mmap' makes pointer from integer without a cast [-Wint-conversion]
         virt_addr = mmap(mapto, len, PROT_WRITE | PROT_READ, MAP_SHARED|MAP_FIXED,
                          ^~~~~

gcc 7.2.0

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.2.0 (GCC)
zamaudio commented 6 years ago

Second warning silenced, haven't fixed the first one yet, it's nothing to worry about though.