move 'type' variable to inside an #if statement

removes an unused variable when compile without NGX_DEBUG, allows for
building with -Werror.
This commit is contained in:
Jeffrey Crowell
2015-03-30 11:21:17 -04:00
parent f4fd9a3f7c
commit e206e871aa
+2
View File
@@ -120,7 +120,9 @@ void NgxBaseFetch::ReadCallback(const ps_event_data& data) {
NgxBaseFetch* base_fetch = reinterpret_cast<NgxBaseFetch*>(data.sender);
ngx_http_request_t* r = base_fetch->request();
bool detached = base_fetch->detached();
#if (NGX_DEBUG) // `type` is unused if NGX_DEBUG isn't set, needed for -Werror.
const char* type = BaseFetchTypeToCStr(base_fetch->base_fetch_type_);
#endif
int refcount = base_fetch->DecrementRefCount();
#if (NGX_DEBUG)