spice/server
Frediano Ziglio 41aa4a978f utils: Avoid possible unaligned access
Code in rgb32_data_has_alpha possibly generate this warning using
clang:

utils.c:35:16: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Werror,-Wcast-align]
        line = (uint32_t *)data;
               ^~~~~~~~~~~~~~~~

Although the images are expected to be all aligned in this respect
use byte access on the data instead. This, beside fixing the alignment
issue also avoid problem with big endian machines (images in SPICE are
expected to have the alpha channel as the forth byte).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-01-31 14:17:39 +00:00
..
tests Avoid some alignment warnings using clang 2018-01-31 13:35:46 +00:00
.gitignore gitignore: Reuse top-level gitignore 2016-12-14 19:09:21 +00:00
agent-msg-filter.c Fix minor inconsistencies with declaration and definition 2017-02-16 10:28:52 +00:00
agent-msg-filter.h Unify header guards 2017-03-30 18:17:20 +01:00
cache-item.h Unify header guards 2017-03-30 18:17:20 +01:00
cache-item.tmpl.c red-pipe-item: Use GLib memory functions 2017-10-11 12:52:17 +01:00
char-device.c char-device: Avoid to use unaligned memory 2018-01-31 13:31:29 +00:00
char-device.h stream-device: Add device to handle streaming 2017-10-16 19:59:14 +01:00
common-graphics-channel.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
common-graphics-channel.h common-graphics-channel: Move "qxl" property to DisplayChannel 2017-09-07 06:42:01 +01:00
cursor-channel-client.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
cursor-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
cursor-channel.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
cursor-channel.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
dcc-private.h Rename StreamAgent to VideoStreamAgent 2017-11-30 11:51:09 -06:00
dcc-send.c dcc-send: Avoid to use unaligned memory 2018-01-29 21:12:16 +00:00
dcc.c video-stream: Initialise VideoStreamClipItem directly 2017-12-12 17:25:42 +00:00
dcc.h dcc: Remove obsolete comment 2017-12-19 16:28:09 +00:00
demarshallers.h Unify header guards 2017-03-30 18:17:20 +01:00
dispatcher.c Remove common/mem.h includes 2017-11-21 08:27:09 +00:00
dispatcher.h Add documentation for Dispatcher 2017-09-07 11:12:45 -05:00
display-channel-private.h Move RedUpgradeItem declaration in video-stream.h 2017-12-12 17:25:55 +00:00
display-channel.c display-channel: Limit number of surfaces to 1024 2018-01-08 09:59:59 +00:00
display-channel.h Reduce dependencies from red-qxl.h 2017-12-01 22:19:31 +00:00
display-limits.h display-channel: Limit number of surfaces to 1024 2018-01-08 09:59:59 +00:00
event-loop.c event-loop: Use GLib memory functions 2017-10-11 12:52:17 +01:00
glib-compat.h Use verify instead of G_STATIC_ASSERT 2017-12-01 22:49:46 +00:00
glz-encode-match.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
glz-encode.tmpl.c Fix -Werror=format with DEBUG_ENCODE 2016-07-01 14:00:37 +02:00
glz-encoder-dict.c Make various functions static 2017-04-05 12:39:20 +02:00
glz-encoder-dict.h Make various functions static 2017-04-05 12:39:20 +02:00
glz-encoder-priv.h Unify header guards 2017-03-30 18:17:20 +01:00
glz-encoder.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
glz-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
gstreamer-encoder.c gstreamer-encoder: Use GLib memory functions 2017-10-11 12:52:17 +01:00
image-cache.c Use constant variables for image operations 2017-11-08 15:23:49 +00:00
image-cache.h Unify header guards 2017-03-30 18:17:20 +01:00
image-encoders.c image-encoders: Use GLib memory functions 2017-09-19 16:17:10 +01:00
image-encoders.h Unify header guards 2017-03-30 18:17:20 +01:00
inputs-channel-client.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
inputs-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
inputs-channel.c inputs-channel: Move spice_server_kbd_leds to InputsChannel 2017-12-19 16:29:41 +00:00
inputs-channel.h inputs-channel: Move spice_server_kbd_leds to InputsChannel 2017-12-19 16:29:41 +00:00
jpeg-encoder.c Start using GLib memory allocation 2017-09-19 16:17:10 +01:00
jpeg-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
lz4-encoder.c Avoid some alignment warnings using clang 2018-01-31 13:35:46 +00:00
lz4-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
main-channel-client.c main-channel-client: Do not call red_channel_client_begin_send_message if we are not sending a message 2017-12-19 17:05:48 +00:00
main-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
main-channel.c Handle SPICE_MSGC_DISCONNECTING message in RedChannelClient 2017-12-05 10:54:09 +00:00
main-channel.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
main-dispatcher.c MainDispatcher: use correct argument type 2017-09-07 10:22:15 -05:00
main-dispatcher.h Unify header guards 2017-03-30 18:17:20 +01:00
Makefile.am build: Use $(srcdir) when it makes sense 2017-12-08 14:30:51 +01:00
memslot.c Start using GLib memory allocation 2017-09-19 16:17:10 +01:00
memslot.h Add a red_memslot_info_destroy function 2016-11-25 14:36:40 +00:00
migration-protocol.h Unify header guards 2017-03-30 18:17:20 +01:00
mjpeg-encoder.c mjpeg-encoder: Fix some typos 2017-11-29 11:17:21 +00:00
net-utils.c Minor compatibility with FreeBSD system 2018-01-15 16:52:57 +00:00
net-utils.h reds-stream: Introduce reds_stream_get_no_delay() helper 2017-03-31 12:22:52 +02:00
pixmap-cache.c pixmap-cache: Use GLib memory functions 2017-10-11 12:52:17 +01:00
pixmap-cache.h Unify header guards 2017-03-30 18:17:20 +01:00
red-channel-capabilities.c Remove common/mem.h includes 2017-11-21 08:27:09 +00:00
red-channel-capabilities.h Unify header guards 2017-03-30 18:17:20 +01:00
red-channel-client.c red-channel-client: Rename item_in_pipe to item_sent 2017-12-01 22:15:16 +00:00
red-channel-client.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
red-channel.c channel: Introduce logging helpers 2017-10-23 20:29:31 +01:00
red-channel.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
red-client.c red-client: Prevent RedChannelClient creation when the RedClient is being destroyed 2017-08-31 18:05:26 +01:00
red-client.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
red-common.h red-common: Avoid some not used warning using clang 2018-01-31 13:50:31 +00:00
red-parse-qxl.c red-parse-qxl: Copy correctly brush position 2018-01-13 21:00:43 +00:00
red-parse-qxl.h red-parse-qxl: Change int/1/0 to bool/true/false 2017-05-02 11:30:43 +02:00
red-pipe-item.c red-pipe-item: Use GLib memory functions 2017-10-11 12:52:17 +01:00
red-pipe-item.h red-pipe-item: Move typedef at the top to avoid a "struct RedPipeItem" 2017-12-19 16:28:17 +00:00
red-qxl.c channel: Introduce logging helpers 2017-10-23 20:29:31 +01:00
red-qxl.h gl: fix client mouse mode 2017-10-04 10:57:39 +01:00
red-record-qxl.c clang: Don't compute absolute value of unsigned 2018-01-08 10:20:02 +00:00
red-record-qxl.h Unify header guards 2017-03-30 18:17:20 +01:00
red-replay-qxl.c clang: Don't compute absolute value of unsigned 2018-01-08 10:20:02 +00:00
red-stream.c red-stream: Handle reading of 0 bytes in red_stream_async_read 2018-01-30 15:06:03 +00:00
red-stream.h Handle SASL initialisation mainly in red-stream.c 2018-01-09 17:06:04 +00:00
red-worker.c Minor compatibility with FreeBSD system 2018-01-15 16:52:57 +00:00
red-worker.h Reduce dependencies from red-qxl.h 2017-12-01 22:19:31 +00:00
reds-private.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
reds.c reds: Remove stream watch handling link in a single place 2018-01-30 22:39:18 +00:00
reds.h reds: Fix typo in declaration 2017-12-12 07:03:02 +00:00
smartcard-channel-client.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
smartcard-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
smartcard.c Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
smartcard.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
sound.c sound: Avoid cast that could cause alignment problems 2018-01-31 13:39:54 +00:00
sound.h Change playback_compression to bool type 2017-04-07 15:08:43 -05:00
spice-audio.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-bitmap-utils.c Attempt to create bitmap debug directory 2017-04-07 16:45:54 +01:00
spice-bitmap-utils.h Use verify instead of G_STATIC_ASSERT 2017-12-01 22:49:46 +00:00
spice-bitmap-utils.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
spice-char.h Constify spice_server_char_device_recognized_subtypes 2016-06-29 08:09:03 +01:00
spice-core.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-experimental.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-input.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-migration.h server: Use SPICE_GNUC_DEPRECATED to avoid a dependency on glib.h 2016-08-12 09:47:40 +01:00
spice-qxl.h spice-qxl: Add version information 2017-09-07 16:13:49 +01:00
spice-replay.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-server-enums.tmpl.c syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server-enums.tmpl.h syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server.h Convert RedChannelClient hierarchy to GObject 2016-10-07 14:46:37 -05:00
spice-server.syms streaming: Let the administrator pick the video encoder and codec 2016-06-14 17:04:40 +02:00
spice-version.h.in build-sys: generate spice-version.h 2014-11-27 14:27:33 +01:00
spice.h Make red-replay-qxl.h a public header 2016-11-10 06:37:15 +00:00
spicevmc.c Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
stat-file.c stat-file: Protect flags field with atomic operation 2017-12-19 12:18:56 +00:00
stat-file.h Unify header guards 2017-03-30 18:17:20 +01:00
stat.h Unify header guards 2017-03-30 18:17:20 +01:00
stream-channel.c stream-channel: Tell client we are just streaming data 2018-01-30 15:12:01 +00:00
stream-channel.h Make stream-channel.h self-contained 2017-10-30 12:01:24 +01:00
stream-device.c StreamDevice: assert preconditions in parsing functions 2017-12-05 09:00:34 +00:00
sw-canvas.c remove sw-canvas.h 2016-05-09 12:45:37 +01:00
tree.c tree: Use GLib memory functions 2017-10-11 12:52:17 +01:00
tree.h Unify header guards 2017-03-30 18:17:20 +01:00
utils.c utils: Avoid possible unaligned access 2018-01-31 14:17:39 +00:00
utils.h utils: Use const for rgb32_data_has_alpha data argument 2018-01-29 21:11:38 +00:00
video-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
video-stream.c video-stream: Simplify update_client_playback_delay 2017-12-12 17:25:53 +00:00
video-stream.h Move RedUpgradeItem declaration in video-stream.h 2017-12-12 17:25:55 +00:00
zlib-encoder.c Start using GLib memory allocation 2017-09-19 16:17:10 +01:00
zlib-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00