From: Prince Kumar Dubey Date: Mon, 16 Oct 2017 20:36:09 +0000 (-0700) Subject: eina: fix warning if EINA_SAFETY_CHECKS is disabled X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~2204 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=030a3448fb0b4c075cafe359a15c4dec6933e3c8;p=platform%2Fupstream%2Fefl.git eina: fix warning if EINA_SAFETY_CHECKS is disabled Summary: Putting local variable "d" under preprocessor flag "EINA_SAFETY_CHECKS" to avoid below warning, if "EINA_SAFETY_CHECKS" is disabled. 1. local variable "d" is assigned but not used. 2. If warning 1 is resolved then variable "d" will be unused. Reviewers: raster, cedric Reviewed By: cedric Subscribers: jpeg, rajeshps Differential Revision: https://phab.enlightenment.org/D5321 Signed-off-by: Cedric BAIL --- diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c index 68cb948..5496408 100644 --- a/src/lib/eina/eina_log.c +++ b/src/lib/eina/eina_log.c @@ -2350,12 +2350,16 @@ eina_log_timing(int domain, Eina_Log_State state, const char *phase) { +#ifdef EINA_SAFETY_CHECKS Eina_Log_Domain *d; +#endif Eina_Log_Timing *t; if (_disable_timing) return; +#ifdef EINA_SAFETY_CHECKS d = _log_domains + domain; +#endif t = _log_timing + domain; #ifdef EINA_SAFETY_CHECKS if (EINA_UNLIKELY(d->deleted))