rofi/source
Till Hofmann b77a48c628 tests: initialize char* in mode test (#875)
* tests: initialize char* in mode test

Currently, test_mode_result relies on undefined behavior.
The test calls mode_result, which checks whether the pointer is NULL.
However, the pointer was never initialized, so it may or may not be
NULL, depending on the compiler.

This caused a test failure on ppc64 and Fedora 28, apparently because in
this setting, gcc sets uninitialized pointers to NULL.

By initializing the pointer to the empty string, the behavior is defined
and the test passes on all architectures.

* mode: fix input pointer check in mode_result

Do not check whether *input (i.e., the char* the input points to) is
NULL, as this is valid. Instead, check whether the input itself is NULL.

* tests: make char* input arg in test_mode_result modifiable

The function mode_result expects a modifiable char*, initialize the
argument properly so it can be modified.
2018-12-14 17:05:07 +01:00
..
dialogs [DRUN] Add drun-display-format. 2018-10-17 23:02:50 +02:00
widgets Indent the code. 2018-08-08 15:55:13 +02:00
css-colors.c [ThemeParser] Add CSS color names support 2017-05-15 22:46:33 +02:00
helper.c Add an option to change the matching negation character. 2018-12-14 16:58:26 +01:00
history.c Indent the code. 2018-08-08 15:55:13 +02:00
keyb.c Indent the code. 2018-08-08 15:55:13 +02:00
mode.c tests: initialize char* in mode test (#875) 2018-12-14 17:05:07 +01:00
rofi-icon-fetcher.c Indent the code. 2018-08-08 15:55:13 +02:00
rofi-types.c use color, background-color and border-color 2017-09-06 19:02:09 +02:00
rofi.c Indent the code. 2018-08-08 15:55:13 +02:00
theme.c Indent the code. 2018-08-08 15:55:13 +02:00
timings.c meson: Actually define TIMINGS if needed (#621) 2017-07-04 15:35:49 +02:00
view.c Indent the code. 2018-08-08 15:55:13 +02:00
xcb.c Indent the code. 2018-08-08 15:55:13 +02:00
xrmoptions.c Add an option to change the matching negation character. 2018-12-14 16:58:26 +01:00