mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-05 15:48:53 +00:00
Detect missing initializations
Write invalid data in memory to easily detect missing initializations in debug mode.
This commit is contained in:
parent
cdf09805c0
commit
fd0f432e87
1 changed files with 4 additions and 0 deletions
|
@ -312,6 +312,10 @@ scrcpy_generate_scid(void) {
|
||||||
enum scrcpy_exit_code
|
enum scrcpy_exit_code
|
||||||
scrcpy(struct scrcpy_options *options) {
|
scrcpy(struct scrcpy_options *options) {
|
||||||
static struct scrcpy scrcpy;
|
static struct scrcpy scrcpy;
|
||||||
|
#ifndef NDEBUG
|
||||||
|
// Detect missing initializations
|
||||||
|
memset(&scrcpy, 42, sizeof(scrcpy));
|
||||||
|
#endif
|
||||||
struct scrcpy *s = &scrcpy;
|
struct scrcpy *s = &scrcpy;
|
||||||
|
|
||||||
// Minimal SDL initialization
|
// Minimal SDL initialization
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue