vergoh / vnstat

vnStat - a network traffic monitor for Linux and BSD
GNU General Public License v2.0
1.36k stars 120 forks source link

Mark input argument to hextorgb const #214

Closed cgzones closed 2 years ago

cgzones commented 2 years ago
tests/image_tests.c: In function ‘hextorgb_can_convert_fn’:
tests/image_tests.c:738:18: warning: passing argument 1 of ‘hextorgb’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  738 |         hextorgb(000000, rgb);
      |                  ^~~~~~~~
In file included from tests/image_tests.c:7:
./src/image_support.h:18:21: note: expected ‘char *’ but argument is of type ‘const char *’
   18 | void hextorgb(char *input, int *rgb);
      |               ~~~~~~^~~~~
vergoh commented 2 years ago

Thanks