summaryrefslogtreecommitdiffstats
path: root/217.patch
blob: cda53d2adee87f6929cd06d724c54866ca04851e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 05efe9a3e6574d7692fbd49f3116f5db320e71a9 Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Thu, 5 Nov 2015 15:52:52 +0100
Subject: [PATCH] fix -Wmaybe-uninitialized

---
 usefulstuff.c  | 2 +-
 xdebug_stack.c | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/usefulstuff.c b/usefulstuff.c
index 60e8f19..1ed45c8 100644
--- a/usefulstuff.c
+++ b/usefulstuff.c
@@ -619,7 +619,7 @@ int xdebug_format_output_filename(char **filename, char *format, char *script_na
 				case 'R': { /* $_SERVER['REQUEST_URI'] */
 					char *char_ptr, *strval;
 #if PHP_VERSION_ID >= 70000
-					zval *data;
+					zval *data = NULL;
 
 					if (Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY) {
 						switch (*format) {
diff --git a/xdebug_stack.c b/xdebug_stack.c
index a13b2a4..9ecf4ec 100644
--- a/xdebug_stack.c
+++ b/xdebug_stack.c
@@ -1505,9 +1505,6 @@ function_stack_entry *xdebug_add_stack_frame(zend_execute_data *zdata, zend_op_a
 		aggr_key_len = strlen(aggr_key);
 #if PHP_VERSION_ID >= 70000
 		aggr_key_str = zend_string_init(aggr_key, aggr_key_len, 0);
-#endif
-
-#if PHP_VERSION_ID >= 70000
 		if ((tmp->aggr_entry = zend_hash_find_ptr(&XG(aggr_calls), aggr_key_str)) == NULL) {
 #else
 		if (zend_hash_find(&XG(aggr_calls), aggr_key, aggr_key_len+1, (void**)&tmp->aggr_entry) == FAILURE) {