misc clang fixes

Submitted by Victor Toso on Dec. 21, 2017, 9:32 a.m.

Details

Reviewer None
Submitted Dec. 21, 2017, 9:32 a.m.
Last Updated Dec. 21, 2017, 3:04 p.m.
Revision 2

Cover Letter(s)

Revision 1
      From: Victor Toso <me@victortoso.com>

Just playing a bit with clang's warnings. One can build
spice-server with -Wall while removing:

* -Wno-cast-align and -Wno-address-of-packed-member - plenty
  warnings yet.

* -Wno-unused-function due GObject's boilerplate

* -Wno-deprecated-declarations due usage of .set_mm_time from
  QXLInterface in server/tests/replay.c - harmless. I thought in
  wrapping it between G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS macros
  but that's only available in glib 2.32 while we require 2.28.
  I take that it is easy to forget a -Wno-deprecated-declarations
  in server/tests/Makefile.am.

Victor Toso (3):
  clang: Don't compute absolute value of unsigneds
  clang: Fix possible wrong computation
  clang: remove double promotion

 server/gstreamer-encoder.c                     | 7 ++++++-
 server/red-record-qxl.c                        | 2 +-
 server/red-replay-qxl.c                        | 2 +-
 server/tests/test-display-resolution-changes.c | 4 ++--
 4 files changed, 10 insertions(+), 5 deletions(-)
    

Revisions