com php-src: fixed "unused function" compilation warning: Zend/zend_vm_execute.h Zend/zend_vm_gen.php
| From: | Dmitry Stogov | Date: | Mon, 18 Dec 2017 08:43:12 +0000 |
| Subject: | com php-src: fixed "unused function" compilation warning: Zend/zend_vm_execute.h Zend/zend_vm_gen.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100631@lists.php.net to get a copy of this message | ||
Commit: f860ae451a2e052c72006a23ac4e74007403cfd7
Author: Dmitry Stogov <dmitry@zend.com> Mon, 18 Dec 2017 11:43:12 +0300
Parents: b337b90bac7ccca10e4bcd5c3cdd02d48d4dd67d
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f860ae451a2e052c72006a23ac4e74007403cfd7
Log:
fixed "unused function" compilation warning
Changed paths:
M Zend/zend_vm_execute.h
M Zend/zend_vm_gen.php
Diff:
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 8990bcd..b729a31 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -323,7 +323,9 @@ static int zend_handlers_count;
static const void * const * zend_opcode_handler_funcs;
static zend_op hybrid_halt_op;
#endif
+#if (ZEND_VM_KIND != ZEND_VM_KIND_HYBRID)
static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op* op);
+#endif
#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)
static const void *zend_vm_get_opcode_handler_func(zend_uchar opcode, const zend_op* op);
@@ -67695,10 +67697,12 @@ static const void *zend_vm_get_opcode_handler_ex(uint32_t spec, const
zend_op* o
return zend_opcode_handlers[(spec & SPEC_START_MASK) + offset];
}
+#if ZEND_VM_KIND != ZEND_VM_KIND_HYBRID
static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op* op)
{
return zend_vm_get_opcode_handler_ex(zend_spec_handlers[opcode], op);
}
+#endif
#if ZEND_VM_KIND == ZEND_VM_KIND_HYBRID
static const void *zend_vm_get_opcode_handler_func(zend_uchar opcode, const zend_op* op)
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index 67a4aa0..4f4ad4c 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -1638,7 +1638,9 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name,
$initializer_name)
out($f,"static zend_op hybrid_halt_op;\n");
out($f,"#endif\n");
}
- out($f,"static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op*
op);\n\n");
+ out($f,"#if (ZEND_VM_KIND != ZEND_VM_KIND_HYBRID)\n");
+ out($f,"static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op*
op);\n");
+ out($f,"#endif\n\n");
if ($kind == ZEND_VM_KIND_HYBRID) {
out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
out($f,"static const void *zend_vm_get_opcode_handler_func(zend_uchar opcode, const
zend_op* op);\n");
@@ -2501,6 +2503,7 @@ function gen_vm($def, $skel) {
out($f, "\treturn zend_opcode_handlers[(spec & SPEC_START_MASK) + offset];\n");
}
out($f, "}\n\n");
+ out($f, "#if ZEND_VM_KIND != ZEND_VM_KIND_HYBRID\n");
out($f, "static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op*
op)\n");
out($f, "{\n");
if (!ZEND_VM_SPEC) {
@@ -2508,7 +2511,8 @@ function gen_vm($def, $skel) {
} else {
out($f, "\treturn zend_vm_get_opcode_handler_ex(zend_spec_handlers[opcode], op);\n");
}
- out($f, "}\n\n");
+ out($f, "}\n");
+ out($f, "#endif\n\n");
if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID) {
// Generate zend_vm_get_opcode_handler_func() function