ext: Fix various compiler warnings with clang

wldisplay.c:179:15: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare]
  if (shm_fmt < 0)
      ~~~~~~~ ^ ~

gstsegmentation.cpp:419:40: error: implicit conversion from 'int' to 'char' changes value from 255 to -1 [-Werror,-Wconstant-conversion]
          filter->cvFG->imageData[j] = 255;
                                     ~ ^~~

https://bugzilla.gnome.org/show_bug.cgi?id=775112
This commit is contained in:
Sebastian Dröge 2016-11-25 23:47:15 +02:00
parent 939528e542
commit 9b89f58cae
2 changed files with 2 additions and 2 deletions

View file

@ -416,7 +416,7 @@ gst_segmentation_transform_ip (GstVideoFilter * btrans, GstVideoFrame * frame)
if (background_diff
((uchar *) filter->cvYUV->imageData + j * 3,
(codeBook *) & (filter->TcodeBook[j]), 3, minMod, maxMod)) {
filter->cvFG->imageData[j] = 255;
filter->cvFG->imageData[j] = (char) 255;
} else {
filter->cvFG->imageData[j] = 0;
}

View file

@ -176,7 +176,7 @@ gst_wl_display_check_format_for_shm (GstWlDisplay * display,
guint i;
shm_fmt = gst_video_format_to_wl_shm_format (format);
if (shm_fmt < 0)
if (shm_fmt == (enum wl_shm_format) -1)
return FALSE;
formats = display->shm_formats;