[Asterisk-code-review] include/asterisk/time.h: Renamed global declaration:tv (asterisk[master])

Diederik de Groot asteriskteam at digium.com
Thu Jan 7 03:27:28 CST 2016


Diederik de Groot has uploaded a new change for review.

  https://gerrit.asterisk.org/1923

Change subject: include/asterisk/time.h: Renamed global declaration:tv
......................................................................

include/asterisk/time.h: Renamed global declaration:tv

Renamed global declaration:tv to __ast_tv, which causes 'shadow' warnings
when 'tv' was declared as a local variable elsewhere.

ASTERISK-25627

Change-Id: I9a6e17995006584f3627efe8988e3f8aa0f5dc28
---
M include/asterisk/time.h
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/23/1923/1

diff --git a/include/asterisk/time.h b/include/asterisk/time.h
index 5294906..7e91503 100644
--- a/include/asterisk/time.h
+++ b/include/asterisk/time.h
@@ -38,9 +38,9 @@
 /* We have to let the compiler learn what types to use for the elements of a
    struct timeval since on linux, it's time_t and suseconds_t, but on *BSD,
    they are just a long. */
-extern struct timeval tv;
-typedef typeof(tv.tv_sec) ast_time_t;
-typedef typeof(tv.tv_usec) ast_suseconds_t;
+extern struct timeval __ast_tv;
+typedef typeof(__ast_tv.tv_sec) ast_time_t;
+typedef typeof(__ast_tv.tv_usec) ast_suseconds_t;
 
 /*!
  * \brief Computes the difference (in seconds) between two \c struct \c timeval instances.

-- 
To view, visit https://gerrit.asterisk.org/1923
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a6e17995006584f3627efe8988e3f8aa0f5dc28
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Diederik de Groot <dkgroot at talon.nl>



More information about the asterisk-code-review mailing list