summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-09-05 19:27:26 +0000
committerMarcus Boerger <helly@php.net>2003-09-05 19:27:26 +0000
commit14ffad71d65c8d6e6566206ed7c531f79d5c0cd4 (patch)
tree0757f0613a78713a572a9f8accc27cea974f6aea
parent193f5a67db50e1dd8f5fdbac253018718dd63e45 (diff)
downloadphp-git-14ffad71d65c8d6e6566206ed7c531f79d5c0cd4.tar.gz
Fix warnings
-rw-r--r--ext/mysqli/mysqli_nonapi.c2
-rw-r--r--ext/mysqli/mysqli_profiler.c4
-rw-r--r--ext/mysqli/mysqli_profiler.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 5a463339a3..e98253c714 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -194,6 +194,8 @@ PHP_FUNCTION(mysqli_query)
if (MyG(profiler)) {
gettimeofday(&starttime, NULL);
prresult = (PR_RESULT *)MYSQLI_PROFILER_NEW(prquery, MYSQLI_PR_RESULT, 1);
+ } else {
+ prresult = NULL;
}
result = (resultmode == MYSQLI_USE_RESULT) ? mysql_use_result(mysql) : mysql_store_result(mysql);
diff --git a/ext/mysqli/mysqli_profiler.c b/ext/mysqli/mysqli_profiler.c
index 39cad4b8a6..29212dd7fd 100644
--- a/ext/mysqli/mysqli_profiler.c
+++ b/ext/mysqli/mysqli_profiler.c
@@ -49,7 +49,9 @@ PR_COMMON *php_mysqli_profiler_new_object(PR_COMMON *parent, unsigned int type,
break;
case MYSQLI_PR_RESULT:
prnew = (PR_COMMON *)ecalloc(1, sizeof(PR_RESULT));
- break;
+ break;
+ default:
+ return NULL;
}
prnew->header.type = type;
prnew->header.filename = estrdup(zend_get_executed_filename(TSRMLS_C));
diff --git a/ext/mysqli/mysqli_profiler.h b/ext/mysqli/mysqli_profiler.h
index 0b12e2fd91..47288338da 100644
--- a/ext/mysqli/mysqli_profiler.h
+++ b/ext/mysqli/mysqli_profiler.h
@@ -145,6 +145,8 @@ extern PR_MAIN *prmain;
if (MyG(profiler))\
{\
cmd = (PR_COMMAND *)php_mysqli_profiler_new_object((PR_COMMON *)parent, MYSQLI_PR_COMMAND,1);\
+} else {\
+ cmd = NULL;\
}
#define MYSQLI_PROFILER_COMMAND_RETURNLONG(cmd, value)\