Commit Graph

10 Commits

Author SHA1 Message Date
Frediano Ziglio
47cbfd4c59 Use SPICE_CONTAINEROF to avoid some possible alignment warnings on MIPS
This patch came from some experiments using an emulated MIPS machine.
On such architecture due to not supporting alignment access the
compiler is more strict about conversion complaining with some
pointer casts. Use different conversion to avoid these warnings.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2019-06-18 09:48:28 +01:00
Frediano Ziglio
ed68d491fd Do not check for HAVE_CONFIG_H
This should always be defined and including config.h is a requirement.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-04-30 09:26:55 +01:00
Frediano Ziglio
f536ca9f30 pixmap-cache: Use GLib memory functions
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2017-10-11 12:52:17 +01:00
Christophe Fergeau
6377b72d44 Use bool rather than int return values when appropriate
This commit changes all functions returning TRUE/FALSE from having an
'int' return value to 'bool'.
This way it's obvious that such a function is not going to return
anything else than TRUE or FALSE.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-03-09 18:39:29 +01:00
Frediano Ziglio
c18b696f1c Use SPICE_VERIFY macro for RHEL6 compatibility
The verify macro used currently has some problem
as it raise a warning in RHEL6.
Use new SPICE_VERIFY macro defined in spice-common
to avoid this issue.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-11-14 17:22:02 +00:00
Christophe Fergeau
0ae0814696 Fix 'freezed' typo
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-09-09 14:56:31 +01:00
Frediano Ziglio
02adcf354e Introduce SPICE_UPCAST macro
This was proposed by Christophe as improvement over some typesafe
patches.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-24 18:00:51 +01:00
Frediano Ziglio
70f04bdab3 Get code more typesafe
Scan remaining code searching for problems with structure
layout assumptions in the code.
Where code required some restructuring put some verify checks
to make sure code won't compile if these assumptions are not
in place anymore.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-05-21 04:14:13 +01:00
Christophe Fergeau
c0b2b1fc49 syntax-check: Add missing #include <config.h> 2015-10-19 14:25:36 +02:00
Marc-André Lureau
b15527e063 server: move some pixmap cache code in own file
Remove that hideous template header that should really be regular code
since it's specialized and instanciated only for pixmap.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-19 13:08:21 +01:00