Commit Graph

4893 Commits

Author SHA1 Message Date
Jon A. Cruz
a67c541e27 Converted the config parser test to the new framework.
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-17 13:27:56 +03:00
Jon A. Cruz
646aef543e Enables output in the JUnit XML format.
Adds basic support for optionally outputting in the XML format
commonly used by JUnit compatible tools.

This format is supported by default by many tools, including
the Jenkins build system. It also is more detailed and
captures more information than the more simplistic TAP
format.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-17 13:27:39 +03:00
Ross Burton
315476fa7b build: don't duplicate rule for weston.desktop
dist_wayland_session_DATA will distribute and install src/weston.desktop, so the
definition of wayland_session_DATA which also installs src/weston.desktop will
result in the file being installed twice and (rarely) cause install to fail.

Spotted and fix by Roy Li <rongqing.li@windriver.com>.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:45:16 -07:00
Derek Foreman
2217f3f738 shell: Switch middle and right mouse bindings
Currently rotate is on the right mouse button and resize is on the middle.

As fantastic as rotating windows is, it's probably nicer to have resize on
the right button, especially for anyone with only 2 buttons.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-16 19:35:19 -07:00
Derek Foreman
6bc33d63cf log: Open log file CLOEXEC so child processes don't get the fd
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:28:36 -07:00
Bryce Harrington
4a8a3a1c71 input: Also pass appropriate pointer type when libva unavailable 2015-07-16 19:12:26 -07:00
Derek Foreman
99a6a2db4c bindings: Make run binding functions take apropriate device instead of a seat
Going from seat to input device requires that we test the device
before relying on the pointer.  In all of these binding functions
we can trust exactly one input device type directly.  If we pass
that in instead of a seat it's more obvious that we can trust
the one pointer we have.

When a seat is required, we can access through the device we have
and use that to get to other device types for the seat, provided
we validate them appropriately.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:40 -07:00
Derek Foreman
b591a30ac2 bindings: make install_binding_grab take a keyboard instead of a seat
It doesn't need the seat pointer, and the caller should already have
tested that the keyboard pointer is valid.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:32 -07:00
Derek Foreman
f7b2f8b0a6 desktop-shell: Use the grabbed pointer in popup_grab_button
This should be identical to the pointer in shset->seat.

A later patch prevents direct access to seat->pointer, using the
known valid pointer in the grab will be nicer than using the
getter functions that patch introduces.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:19 -07:00
Derek Foreman
8fbebbd985 desktop-shell: Make surface_resize take a pointer instead of a seat
It doesn't actually need the seat and we have to validate that the seat
has a pointer before making the call, so it's safer just to pass
the validated pointer.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:17 -07:00
Derek Foreman
74de4693b7 desktop-shell: Make surface_rotate take a pointer instead of a seat
It doesn't actually need the seat and we have to validate that the seat
has a pointer before making the call, so it's safer just to pass
the validated pointer.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:07 -07:00
Derek Foreman
794fa0e031 desktop-shell: Make surface_move take a pointer instead of a seat
It doesn't actually need the seat and we have to validate that the seat
has a pointer before making the call, so it's safer just to pass
the validated pointer.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:04 -07:00
Derek Foreman
b7674ae4dc desktop-shell: Make surface_touch_move take a touch instead of a seat
It never actually needs the seat, and we always verify the touch pointer
before calling it, so let's just pass a touch pointer instead of having
an assumption that the seat's touch pointer has been verified.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:03:56 -07:00
Derek Foreman
8ae2db5b0c input: Pass the appropriate pointer type to bindings instead of a seat
Normally we need to check if a seat's [device_type]_count is > 0 before
we can use the associated pointer.  However, in a binding you're
guaranteed that the seat has a device of that type.  If we pass in
that type instead of the seat, it's obvious we don't have to test it.

The bindings can still get the seat pointer via whatever->seat if they
need it.

This is preparation for a follow up patch that prevents direct access
to seat->device_type pointers, and this will save us a few tests at
that point.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:03:43 -07:00
Derek Foreman
0720ea36c8 compositor-drm: Simplify logic in setup_output_seat_constraint
Use early return for a slight simplification.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:03:42 -07:00
Derek Foreman
2e6485c8aa bindings: Stop exporting internal functions
These functions should never be called outside of the core.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:03:36 -07:00
Derek Foreman
cee82d6286 exposay: Test keyboard presence before using keyboard pointer
We shouldn't actually use the keyboard pointer unless we check that
a keyboard is present.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:03:32 -07:00
Derek Foreman
ddc2c97d59 text-backend: Replace focus_listener_initialized with a bool
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:03:19 -07:00
Pekka Paalanen
d0ead4855f compositor-drm: Refactor code into cursor_bo_update()
Cut a chunk of code out from drm_output_set_cursor() and form a new
function for writing a cursor bo data from a weston_view with a wl_shm
buffer.

Add more asserts to verify the assumptions in there.

v2: Use drm_compositor::cursor_{width,height} instead of hard-coded 64.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 16:47:56 +01:00
Daniel Stone
70d337dfd2 compositor-drm: Fix cursor view size check
Instead of testing against a hardcoded 64x64 pixel size to see if a view
is suitable for promotion to a cursor plane, use our cursor_width and
cursor_height variables.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 16:46:21 +01:00
Daniel Stone
36609c740f compositor-drm: Record current DPMS level
Track the current DPMS level for any given output, and track failure (or
otherwise) of the DPMS-setting property call.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 16:41:50 +01:00
Pekka Paalanen
eee580b894 compositor-drm: Refactor getting current mode into a new function
Makes create_output_for_connector() slightly easier to read.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 16:41:18 +01:00
Pekka Paalanen
3ce6362a33 compositor-drm: Refactor connector name into new function
Refactor the code constructing the connector name into a new function.
This makes create_output_for_connector() slightly easier to read.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-07-16 16:41:02 +01:00
Pekka Paalanen
7b36b420c1 compositor-drm: Refactor initial mode out of create_output
Refactor the code for choosing the initial mode for an output from
create_output_for_connector() to drm_output_choose_initial_mode().

This makes create_output_for_connector() slightly easier to read.

v2: Document everything.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 16:40:41 +01:00
Mario Kleiner
b7df04ebc0 compositor: Respect repaint-window when restarting repaint loop.
If a stopped repaint loop gets restarted due to posting of new
damage, and this restart of the repaint loop happens late in the
video refresh cycle, ie. already inside the repaint-window and
thereby after the composition deadline for the current frame,
then defer the actual output repaint to the composition deadline
of the next video refresh cycle by setting the repaint timer
accordingly.

This tries to make sure that:

a) Client(s) posting damage timely before the composition deadline
   (video refresh duration - "repaint-window" duration) of the
   current refresh cycle will trigger a repaint within the current
   refresh cycle, thereby avoiding one extra frame of compositor
   lag due to the needed restart of the repaint loop if the loop
   was stopped. This allows them to benefit from the earlier
   "instant repaint restart" commit to keep latency low.

b) Late clients which post damage close to the end of a refresh
   cycle can't race other clients if the repaint loop is restarted.
   Instead they will get deferred to the next compositor cycle,
   just as if the repaint loop would have been already running -
   the semantic of the "repaint-window" parameter is preserved.

   This is especially important to prevent a very late client
   from triggering a repaint very close to the vblank, which
   would cause the compositor to certainly miss the vblank and
   skip one frame and then cause a delay of another frame for
   other clients which posted their damage in time for the
   following frame. Iow. this provides clients with a more
   predictable compositor timing and makes it easier for them
   to latch onto the compositors repaint cycle.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-16 14:16:26 +03:00
Mario Kleiner
f507ec3587 compositor-drm: Allow instant start of repaint loop. (v4)
drm_output_start_repaint_loop() incurred a delay of
one refresh cycle by using a no-op page-flip to get
an accurate vblank timestamp as reference. This causes
unwanted lag whenever Weston exited its repaint loop, e.g.,
whenever an application wants to repaint with less than
full video refresh rate but still minimum lag.

Try to use the drmWaitVblank ioctl to get a proper
timestamp instantaneously without lag. If that does
not work, fall back to the old method of idle page-flip.

This optimization will work on any drm/kms driver
which supports high precision vblank timestamping.
As of Linux 4.0 these would be intel, radeon and
nouveau on all their supported gpu's.

On kms drivers without instant high precision timestamping
support, the kernel is supposed to return a timestamp
of zero when calling drmWaitVblank() to query the current
vblank count and time iff vblank irqs are currently
disabled, because the only way to get a valid timestamp
on such kms drivers is to enable vblank interrupts and
then wait a bit for the next vblank irq to take a new valid
timestamp. The caller is supposed to poll until at next
vblank irq it gets a valid non-zero timestamp if it needs
a timestamp.

This zero-timestamp signalling works up to Linux 3.17, but
got broken due to a regression in Linux 3.18 and later. On
Linux 3.18+ with kms drivers that don't have high precision
timestamping, the kernel erroneously returns a stale timestamp
from an earlier vblank, ie. the vblank count and timestamp are
mismatched. A patch is under way to fix this, but to deal with
broken kernels, we also check non-zero timestamps if they are
more than one refresh duration in the past, as this indicates
a stale/invalid timestamp, so we need to take the page-flip
fallback for restarting the repaint loop.

v2: Implement review suggestions by Pekka Paalanen, especially
    extend the commit message to describe when and why the
    instant restart won't work due to missing Linux kernel
    functionality or a Linux kernel regression.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>

v3: Fix timespec_to_nsec() which was computing picoseconds,
    use the new timespec-util.h helpers.

v4: Rebased to master, split long lines.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-16 14:08:26 +03:00
Pekka Paalanen
d7894d052a compositor,shared: add millihz_to_nsec()
A helper to improbe readability.

Cc: Daniel Stone <daniels@collabora.com>
Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-16 13:55:05 +03:00
Pekka Paalanen
aa21f6249f shared: introduce timespec-util.h
Copyright is set according to the moved code from compositor.c.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-16 13:55:05 +03:00
Mario Kleiner
c1809b230c presentation-shm: Allow setting of delay before surface.commit
A new optional parameter "-d msecs" allows to specify a
delay before the surface attach/damage/commit to shift
the point in time when a surface update is committed.

This allows to test how different client timings interact
with the compositors repaint timing.

Suggested by Pekka Paalanen.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

v2: Clarify the intent, doing a delay in window_create_feedback()
    is a bit surprising. Use nanosleep() instead of clock_nanosleep(),
    which may not support the chosen presentation clock.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-16 13:51:03 +03:00
Pekka Paalanen
2abe445546 README: introduce libweston
What is libweston and where do we intend to go with it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-07-16 12:40:02 +03:00
Nobuhiko Tanibata
21deb28648 ivi-shell: transform refactoring to improve it to more readable code
Transform matrix for transforming a surface to global_matrix is
calculated from
* ivi_layout_surface_properties
* ivi_layout_layer_properties

This patch pareares sub-method like following,
1/ calc_surface_to_global_matrix()
 calc_transformation_matrix() is called twice with
 ivi_layout_surface/layer_properties respectively.

2/ calc_transformation_matrix()
 This calcurates matrix from orientation, source rectangle and
 destination rectangle.
 2-1/ To calculate rotation, fit centor of source rectangle to (0,0)
      temporarily. This is moved back in 2-4.
 2-2/ Apply rotation variant
 2-3/ Apply scale variant
 2-4/ Apply positioning variant, taking account into 2-1 temporary
      positioning.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-16 11:58:14 +03:00
Nobuhiko Tanibata
1e6fd66ba5 ivi-shell: transform refactoring, remove transform part of ivi_layout_surface and ivi_layout_layer once
To refactor transform of ivi_layout_surface and ivi_layout_surface to be
more readable logical flow.

Remove following parts once,
* definition of weston_transform in ivi_layout_surface
* update_layer_orientation
* update_layer_position
* update_surface_position
* update_surface_orientation
* update_scale

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-16 11:58:14 +03:00
Nobuhiko Tanibata
4c1dbf7213 ivi-shell: remove one indent level from update_prop()
There is no logic update.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-16 11:57:59 +03:00
Emmanuel Gil Peyrot
8c7287f5ba Partially revert "xwayland: Always free reply from xcb_get_property_reply()"
This reverts commit d3553c721c.

weston_wm_write_property() takes the ownership of the reply it gets as
a parameter, and will eventually free it later in writable_callback.

This change introduced a double-free when Xwayland programs triggered a
copy to the clipboard, leading to a Weston crash.

Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-07-15 13:55:58 -07:00
Christopher Michael
a820b4d635 Documentation for the prepare_lock_surface event description, is incorrect
Documentation for the prepare_lock_surface event description is
incorrect. The summary says "Tell the client..." however the full-text
description says "tell the shell..."

Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

[This time include the actual changes.]
2015-07-14 01:23:28 -07:00
Bryce Harrington
35e7b10d44 zunitc: Fix minor typo
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-14 09:26:55 +03:00
Bryce Harrington
966cc4b5db zunitc: Fix some minor grammatical errors in dox
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-14 09:26:50 +03:00
Bryce Harrington
66f2a383c4 zunitc: wrap dox to 80 columns
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-14 09:26:08 +03:00
Christopher Michael
504c4c56fc Documentation for the prepare_lock_surface event description, is incorrect
Documentation for the prepare_lock_surface event description is
incorrect. The summary says "Tell the client..." however the full-text
description says "tell the shell..."

Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-13 12:57:41 -07:00
Bryce Harrington
29f09fe876 screen-share: Use the correct list pointer when freeing shm buffers
The wl_list_for_each operation on the free_buffers list should use
free_link not link, which is a different list.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-13 12:47:45 -07:00
Giulio Camuffo
2f2a70cc85 compositor: make sure to reset views' pointers to destroyed output
When an output is being destroyed reassign the output of the views
that were in it, to be sure not to keep a dangling pointer which could
be used later on by calling weston_surface_assign_output() on the
view's surface.
Also make sure we send wl_surface.leave events to the surfaces that
were in that output.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-07-13 11:16:55 +01:00
Derek Foreman
f53beb8fb9 compositor-wayland: Use the correct list pointer when freeing shm buffers
The wl_list_for_each operation on the free_buffers list should use
free_link not link, which is a different list.

This fixes a crash when entering fullscreen mode when using the pixman
renderer on the wayland back-end.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-10 18:46:24 -07:00
Bryce Harrington
da41b5739d xwayland: Allow dump_property when selection fails
dump_property allows reply to be NULL.  Calling it unconditionally will
ensure user knows where the selection failed.

Also refactor code a bit.

Suggested by Marek Chalupa
2015-07-10 18:13:48 -07:00
Bryce Harrington
b2d79d504e xwayland: Check return of xcb_get_property_reply() before deref
The man pages indicate this routine can return NULL on certain error
conditions.

Suggested by Marek Chalupa

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
2015-07-10 18:08:26 -07:00
Derek Foreman
cf7d95a688 desktop-shell: make client_initiated a bool
Make it a bool in both surface_move() and struct weston_move_grab

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-07-10 17:11:33 -07:00
Giulio Camuffo
bab996e571 compositor: move the main() to a new main.c file
This commits starts to separate the libweston code from the weston
specific code. As such, the main() is moved, together with signals
handling and configuration handling.

The definition of DEFAULT_REPAINT_WINDOW is left in compositor.c, so the
config loading of repaint_msec is slightly modified to account that.

Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-10 12:46:55 +03:00
Giulio Camuffo
459137bfe6 compositor: add API to manage compositor instances
This commit adds three new exported functions:
- weston_compositor_create() returns a new weston_compositor instance,
initializing it as the now removed weston_compositor_init() did.
- weston_compositor_exit(compositor) asks the compositor to tear
down by calling the compositor's exit vfunc which is set by the
libweston application.
- weston_compositor_destroy(compositor) is called by the libweston
application when tearing down the compositor. The compositor is destroyed
and the memory freed.

Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-10 11:59:08 +03:00
Bryce Harrington
d3553c721c xwayland: Always free reply from xcb_get_property_reply()
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
2015-07-10 01:09:33 -07:00
Bryce Harrington
da9d8fa3e4 clients: Simplify memory allocation with xzalloc()
It is redundant to check x*alloc's return value for null pointers, since
they are guaranteed to either return non-NULL or terminate the program.

In cases where we memset the malloc'd memory to 0, we can more
efficiently use the xzalloc() routine.  zalloc looks for opportunities
to return memory chunks that have already been zero'd out, so it can
provide better performance.

This patch addresses this warning, reported by Denis Denisov:

  [clients/window.c:1164] -> [clients/window.c:1166]: (warning) Possible
  null pointer dereference: surface - otherwise it is redundant to check
  it against null.

  [clients/window.c:4513] -> [clients/window.c:4514]: (warning) Possible
  null pointer dereference: surface - otherwise it is redundant to check
  it against null.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
2015-07-10 00:15:42 -07:00
Bryce Harrington
430aee1c23 weston-launch: Drop redundant exit()
error(1, ...) already will exit, per man page: "If status has a nonzero
value, then error() calls exit(3) to terminate the program using the
given value as the exit status."  So exit(EXIT_FAILURE) is never
reached.

The EXIT_FAILURE macro is guaranteed to be non-zero.  Typically it's
just 1, but on some systems (e.g. OpenVMS apparently) exit(1) means
success so EXIT_FAILURE there is defined to some other non-zero value.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
2015-07-10 00:08:58 -07:00