bugaevc / wl-clipboard

Command-line copy/paste utilities for Wayland
GNU General Public License v3.0
1.62k stars 60 forks source link

warning: pointer of type ‘void *’ used in arithmetic #76

Closed bugaevc closed 4 years ago

bugaevc commented 4 years ago

Build with -Wall -Wpedantic:

In file included from ../src/wl-paste.c:19:
../src/wl-paste.c: In function ‘classify_offer_types’:
../src/types/offer.h:40:49: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
   40 |     mime_type != offer->offered_mime_types.data + \
      |                                                 ^
../src/wl-paste.c:64:5: note: in expansion of macro ‘offer_for_each_mime_type’
   64 |     offer_for_each_mime_type(offer, mime_type) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
../src/wl-paste.c: In function ‘selection_callback’:
../src/types/offer.h:40:49: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
   40 |     mime_type != offer->offered_mime_types.data + \
      |                                                 ^
../src/wl-paste.c:191:9: note: in expansion of macro ‘offer_for_each_mime_type’
  191 |         offer_for_each_mime_type(offer, mime_type) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~