[asterisk-commits] include/asterisk/time.h: Renamed global declaration:tv (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Jan 9 11:15:23 CST 2016
Joshua Colp has submitted this change and it was merged.
Change subject: include/asterisk/time.h: Renamed global declaration:tv
......................................................................
include/asterisk/time.h: Renamed global declaration:tv
Renamed global declaration:tv to dummy_tv_var_for_types,
which would oltherwise cause 'shadow' warnings when 'tv'
was declared as a local variable elsewhere.
Added comment to note that dummy_tv_var_for_types is never
really exported and only used as a place holder.
ASTERISK-25627 #close
Change-Id: I9a6e17995006584f3627efe8988e3f8aa0f5dc28
---
M include/asterisk/time.h
1 file changed, 6 insertions(+), 4 deletions(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
Corey Farrell: Looks good to me, but someone else must approve
diff --git a/include/asterisk/time.h b/include/asterisk/time.h
index 5294906..f49d689 100644
--- a/include/asterisk/time.h
+++ b/include/asterisk/time.h
@@ -37,10 +37,12 @@
/* 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;
+ they are just a long.
+ note:dummy_tv_var_for_types never actually gets exported, only used as
+ local place holder. */
+extern struct timeval dummy_tv_var_for_types;
+typedef typeof(dummy_tv_var_for_types.tv_sec) ast_time_t;
+typedef typeof(dummy_tv_var_for_types.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: merged
Gerrit-Change-Id: I9a6e17995006584f3627efe8988e3f8aa0f5dc28
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Diederik de Groot <dkgroot at talon.nl>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Diederik de Groot <dkgroot at talon.nl>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list