stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <Travis.Vi...@roguewave.com>
Subject RE: svn commit: r659253 - in /stdcxx/branches/4.2.x: examples/manual/ src/ tests/algorithms/ tests/containers/ tests/localization/ tests/numerics/ tests/regress/ tests/src/ tests/strings/ util/
Date Fri, 23 May 2008 21:58:27 GMT
 

>-----Original Message-----
>From: elemings@apache.org [mailto:elemings@apache.org] 
>Sent: Thursday, May 22, 2008 1:55 PM
>To: commits@stdcxx.apache.org
>Subject: svn commit: r659253 - in /stdcxx/branches/4.2.x: 
>examples/manual/ src/ tests/algorithms/ tests/containers/ 
>tests/localization/ tests/numerics/ tests/regress/ tests/src/ 
>tests/strings/ util/
>
>Author: elemings
>Date: Thu May 22 13:54:39 2008
>New Revision: 659253
>
>URL: http://svn.apache.org/viewvc?rev=659253&view=rev
>Log:
>2008-05-22  Eric Lemings <eric.lemings@roguewave.com>
>
>	STDCXX-550
[...]
>	* util/cmdopt.cpp: Explicitly cast return value of sysconf()
>	function to `float' type used by `TICKS_PER_SEC' global.
>	  (eval_options): Cast return value of strtol() function to
>	`unsigned' type.  Second parameter of get_long_val() function
>	expects `unsigned' type (go figure).
[...]
>
>Modified: stdcxx/branches/4.2.x/util/cmdopt.cpp
>URL: 
>http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/util/cmdopt.
>cpp?rev=659253&r1=659252&r2=659253&view=diff
>===============================================================
>===============
>--- stdcxx/branches/4.2.x/util/cmdopt.cpp (original)
>+++ stdcxx/branches/4.2.x/util/cmdopt.cpp Thu May 22 13:54:39 2008
>@@ -59,7 +59,7 @@
> const char suffix_sep = '.';
> const size_t exe_suffix_len = 0;
> #if defined (_SC_CLK_TCK)
>-const float TICKS_PER_SEC = sysconf (_SC_CLK_TCK);
>+const float TICKS_PER_SEC = float (sysconf (_SC_CLK_TCK));
> #elif defined (CLK_TCK)
> const float TICKS_PER_SEC = CLK_TCK;
> #elif defined (CLOCKS_PER_SEC)

Is there some reason to not apply a similar fix to the other definitions
of TICKS_PER_SEC?

>@@ -573,7 +573,7 @@
>                      && !memcmp (opt_exit, argv [i], sizeof 
>opt_exit - 1)) {
>                 /* exit immediately with the specified status */
>                 optname = opt_exit;
>-                optarg  = get_long_val (argv, &i, sizeof 
>opt_exit - 1);
>+                optarg  = get_long_val (argv, &i, unsigned 
>(sizeof opt_exit - 1));

Why not just fix get_long_val() and get_short_val() to take the
appropriate parameter type?



Mime
View raw message