bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] Fixing C89 warnings


From: Darshit Shah
Subject: Re: [Bug-wget] [PATCH] Fixing C89 warnings
Date: Fri, 21 Nov 2014 13:14:08 +0530
User-agent: Mutt/1.5.23 (2014-03-12)

On 11/20, Ángel González wrote:
On 20/11/14 16:56, Gisle Vanem wrote:
FYI. the error from MSVC was:
progress.c(844) : error C2010: '*' : unexpected in macro formal parameter list
 progress.c(978) : error C2059: syntax error : 'do'

Here is a patch:

--- ../Git-latest/src/progress.c        2014-11-20 15:39:55 +0000
+++ progress.c  2014-11-20 16:44:03 +0000
@@ -841,10 +841,7 @@
}
#else
# define count_cols(mbs) ((int)(strlen(mbs)))
-# define cols_to_bytes(mbs, cols, *ncols) do {  \
-    *ncols = cols;                              \
-    bytes = cols;                               \
-}while (0)
+# define cols_to_bytes(mbs, cols, ncols) *ncols = cols
#endif
I suggested this same change last month (2014-10-11). ACK

And I was under the impression that we'd pushed that patch.

Anyways, thanks Tim for fixing it. I'd have preferred the macro expansions because these functions will be called a very large number of times when updating the progress bar. And simple things should ideally just get inlined.

--
Thanking You,
Darshit Shah

Attachment: pgpiDRKdJ7PbQ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]