mate-desktop / pluma

A powerful text editor for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
157 stars 65 forks source link

Remove unused macros #553

Closed rbuj closed 4 years ago

rbuj commented 4 years ago

Test:

$ CFLAGS="-Wunused-macros" ./autogen.sh --prefix=/usr && LANG=en_US.UTF-8 make &> make.log
$ grep -v marshal make.log | grep -v EGG | grep -A 2 unused-macros
<cut>
--
pluma-encodings-combo-box.c:43: warning: macro "ENCODING_KEY" is not used [-Wunused-macros]
   43 | #define ENCODING_KEY "Enconding"
      | 
--
pluma-utils.c:60: warning: macro "STDIN_DELAY_MICROSECONDS" is not used [-Wunused-macros]
   60 | #define STDIN_DELAY_MICROSECONDS 100000
      | 
--
document-saver.c:45: warning: macro "UNOWNED_REMOTE_DIRECTORY" is not used [-Wunused-macros]
   45 | #define UNOWNED_REMOTE_DIRECTORY "sftp://localhost/tmp/pluma-document-saver-unowned"
      | 
sc0w commented 4 years ago

offtopic: @rbuj -Wunused-macros works in c++ ? (I can't find documentation for it)

EDIT: yes, it works

rbuj commented 4 years ago

c++ is a programming language, and the warnings are issued by the compiler. You can find gcc compiler warning list at https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html