Closed dmitryuk closed 2 years ago
Thank you for your pr, but I think it is a question of php-src, I had already feedback at 6462
This warnings are happening while swoole yasd
compiling, not swoole-src
Added fixes for
/home/runner/work/yasd/yasd/src/dbgp.cc:232:16: warning: variable ‘num’ set but not used [-Wunused-but-set-variable]
232 | zend_ulong num;
/home/runner/work/yasd/yasd/src/debuger_mode_base.cc:31:31: warning: comparison of integer expressions of different signedness: ‘const uint32_t’ {aka ‘const unsigned int’} and ‘int’ [-Wsign-compare]
31 | if (frame->opline->lineno == func_line_end && context->level != 1) {
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/runner/work/yasd/yasd/src/debuger_mode_base.cc:33:38: warning: comparison of integer expressions of different signedness: ‘const uint32_t’ {aka ‘const unsigned int’} and ‘int’ [-Wsign-compare]
33 | } else if (frame->opline->lineno == func_line_end && context->level == 1) {
Fixes
/home/runner/work/yasd/yasd/src/cmder_debugger.cc: In member function ‘virtual void yasd::CmderDebugger::init()’:
/home/runner/work/yasd/yasd/src/cmder_debugger.cc:51:21: warning: ‘status’ may be used uninitialized in this function [-Wmaybe-uninitialized]
51 | } while (status != yasd::DebuggerModeBase::status::NEXT_OPLINE);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/yasd/yasd/src/cmder_debugger.cc: In member function ‘virtual void yasd::CmderDebugger::handle_request(const char*, int)’:
/home/runner/work/yasd/yasd/src/cmder_debugger.cc:82:21: warning: ‘status’ may be used uninitialized in this function [-Wmaybe-uninitialized]
82 | } while (status != yasd::DebuggerModeBase::status::NEXT_OPLINE);
/home/runner/work/yasd/yasd/src/logger.cc:48:17: warning: variable ‘level_str’ set but not used [-Wunused-but-set-variable]
48 | const char *level_str;
/home/runner/work/yasd/yasd/yasd.cc:223:20: warning: unused variable ‘online’ [-Wunused-variable]
223 | const zend_op *online = EG(current_execute_data)->opline;
/home/runner/work/yasd/yasd/yasd.cc: In function ‘void yasd_statement_call(zend_execute_data*)’:
/home/runner/work/yasd/yasd/yasd.cc:238:48: warning: ‘lineno’ may be used uninitialized in this function [-Wmaybe-uninitialized]
238 | return global->debugger->handle_request(filename, lineno);
/home/runner/work/yasd/yasd/src/cmder_debugger.cc:381:20: warning: unused variable ‘func’ [-Wunused-variable]
381 | zend_function *func = EG(current_execute_data)->func;
@huanghantao Ready for review
Any chance to review PR?
While building yasd where are a lot of warnings:
The PR fixes them