www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [patch] pedantic compiler warnings

reply Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The attached patch cleans (pedantic) compiler warnings experienced
during GDC building.

Thomas


begin 600 dmd-0.109-pedantic.diff
M9&EF9B`M=7( +BXO+BXO9V1C+3`N."]D+V1M9"]C;&%S<RYC(&0O9&UD+V-L
M87-S+F,-"BTM+2`N+B\N+B]G9&,M,"XX+V0O9&UD+V-L87-S+F,),C`P-"TP






M*3L-"B`-"F1I9F8 +75R("XN+RXN+V=D8RTP+C O9"]D;60O9&5C;&%R871I












M"2\O(&YO="!C;VUP=71E9"!Y970-"B` ("` 24Q3;F\L"0DO+R!C86YN;W0 


M<F%T:6]N(#H 1&5C;&%R871I;VX-"F1I9F8 +75R("XN+RXN+V=D8RTP+C O
M9"]D;60O9'-Y;6)O;"YC(&0O9&UD+V1S>6UB;VPN8PT*+2TM("XN+RXN+V=D



M(&-H87( *D1S>6UB;VPZ.FQO8U1O0VAA<G,H*0T*('L-"B` ("` 3W5T0G5F
M9F5R(&)U9CL-"BT ("` 8VAA<B`J<#L-"B`-"B` ("` 36]D=6QE("IM(#T 

M+V1S>6UB;VPN:"!D+V1M9"]D<WEM8F]L+F -"BTM+2`N+B\N+B]G9&,M,"XX





M.PT*(`T*(`T*9&EF9B`M=7( +BXO+BXO9V1C+3`N."]D+V1M9"]E;G5M+F, 

M,C`P-"TP-2TR,B`R,#HQ-3HS.


M:6]N.CIA9&1-96UB97(H4V-O<&5$<WEM8F]L("IS9"D-"BU[("` :6YT(&D[


M"B` ("` :68 *"%I<T%N;VYY;6]U<R I*0T*9&EF9B`M=7( +BXO+BXO9V1C

M+2T +BXO+BXO9V1C+3`N."]D+V1M9"]E>'!R97-S:6]N+F,),C`P-"TQ,"TQ




M="`J<#L-"B`-"B`):68 *&D /"!N87)G<RD-"B`)("` (&%R9R`]("A%>'!R
M97-S:6]N("HI87)G=6UE;G1S+3YD871A6VE=.PT*0$` +3$P-3DL-R`K,3`U


M9#L-

M.PT*("` ("!);7!O<G0 *FEM<#L-
M($5X<')E<W-I;VX *E1H:7-%>'`Z.G-E;6%N=&EC*%-C;W!E("IS8RD-"B![
M("` 1G5N8T1E8VQA<F%T:6]N("IF9#L-"B` ("` 1G5N8T1E8VQA<F%T:6]N

M14U!3E1)0PT*("` ("!P<FEN=&8H(E1H:7-%>'`Z.G-E;6%N=&EC*"E<;B(I





M<F<I.PT*(`EA<F< /2!A<F<M/FEM<&QI8VET0V%S=%1O*%1Y<&4Z.G1I;F1E




M<R I*3L-"B`)87)G=6UE;G1S+3YD871A6S!=(#T *'9O:60 *BD 87)G.PT*

M97=%>'`Z.G1O0T)U9F9E<BA/=71"=69F97( *F)U9BD-"BU[("` :6YT(&D[


M,SDL-R!`0`T*('T-"B`-"B!%>'!R97-S:6]N("I687)%>'`Z.G-E;6%N=&EC
M*%-C;W!E("IS8RD-"BU[("` 1G5N8TQI=&5R86Q$96-L87)A=&EO;B`J9F0[

M<#HZ<V5M86YT:6,H)7,I7&XB+"!T;T-H87)S*"DI.PT*0$` +3(W,C<L-R`K



M0`T*('T-"B`-"B!V;VED($-A;&Q%>'`Z.G1O0T)U9F9E<BA/=71"=69F97( 




M<"`J8CL-"BT ("` 56YA17AP("IU.PT*(`T*("-I9B!,3T=314U!3E1)0PT*
M("` ("!P<FEN=&8H(D-A<W1%>'`Z.G-E;6%N=&EC*"<E<R<I7&XB+"!T;T-H



M("` ("!P<FEN=&8H(D%R<F%Y3&5N9W1H17AP.CIS96UA;G1I8R G)7,G*5QN

M('9O:60 07)R87E%>'`Z.G1O0T)U9F9E<BA/=71"=69F97( *F)U9BD-"BU[


M0$`-"B`-"B!%>'!R97-S:6]N("I);F1E>$5X<#HZ<V5M86YT:6,H4V-O<&4 


M;6)O;"`J<WEM.PT*(`T*9&EF9B`M=7( +BXO+BXO9V1C+3`N."]D+V1M9"]F






M87)A=&E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



M<F5A:SL-"B`-"F1I9F8 +75R("XN+RXN+V=D8RTP+C O9"]D;60O;'-T<FEN
M9RYH(&0O9&UD+VQS=')I;F<N:`T*+2TM("XN+RXN+V=D8RTP+C O9"]D;60O




M0U]615(-"B` ("` +R\ 1&ES86)L92!W87)N:6YG(&%B;W5T(&YO;G-T86YD
M87)D(&5X=&5N<VEO; T*("` ("`C<')A9VUA('=A<FYI;F< *&1I<V%B;&4 
M.B`T,C`P*0T*+2` ("!D8VAA<B!S=')I;F=;73L-"BLC96YD:68-"BL ("` 






M9 T*("-E;F1I9 T*(`T*+71Y<&5D968 =6YS:6=N960 ;&]N9R!L;VYG(&EN
M=&5G97)?=#L-






M;G,V-#L-"BLC96QS90T**W1Y<&5D968 =6YS:6=N960 ;&]N9R!L;VYG"6EN
M=&5G97)?=#L-"B!T>7!E9&5F(&QO;F< ;&]N9PD)9%]I;G0V-#L-"B!T>7!E
M9&5F('5N<VEG;F5D(&QO;F< ;&]N9PED7W5N<S8T.PT**R-E;F1I9 T*(`T*


M+`T*("` ("!,24Y+8W!P+`T*("` ("!,24Y+=VEN9&]W<RP-"BT ("` 3$E.





M(&-H87( *F9O<FUA="P +BXN*3L-"F1I9F8 +75R("XN+RXN+V=D8RTP+C O







M*$QO8R!L;V,L(%-C;W!E("IS8RD-"BU[("` 17AP<F5S<VEO;B`J93L-"BM[


M"B`-"B!V;VED(%1Y<&54>7!E9&5F.CIT;T1E8V]"=69F97(H3W5T0G5F9F5R




M>PT*("` ("!C:&%R("IN86UE.PT*(`T*("` ("!N86UE(#T <WEM+3YM86YG

M:6]N("I4>7!E4W1R=6-T.CID;W1%>'`H4V-O<&4 *G-C+"!%>'!R97-S:6]N
M("IE+"!)9&5N=&EF:65R("II9&5N="D-"BU[("` =6YS:6=N960 ;V9F<V5T
M.PT**WL-"B`-"B` ("` 17AP<F5S<VEO;B`J8CL-"B` ("` 5F%R1&5C;&%R

M9"!4>7!E0VQA<W,Z.G1O1&5C;T)U9F9E<BA/=71"=69F97( *F)U9BD-"BU[
M("` =6YS:6=N960 ;&5N.PT**WL ("`O+W5N<VEG;F5D(&QE;CL-"B` ("` 


M94-L87-S.CID;W1%>'`H4V-O<&4 *G-C+"!%>'!R97-S:6]N("IE+"!)9&5N
M=&EF:65R("II9&5N="D-"BU[("` =6YS:6=N960 ;V9F<V5T.PT**WL-"B`-
M"BT ("` 17AP<F5S<VEO;B`J8CL-"B` ("` 5F%R1&5C;&%R871I;VX *G8[

M("UU<B`N+B\N+B]G9&,M,"XX+V0O9&UD+VUT>7!E+F  9"]D;60O;71Y<&4N


M,C`P-"TQ,BTQ-2`Q-SHR,#HQ




M;B`Z(%1Y<&4-"F1I9F8 +75R("XN+RXN+V=D8RTP+C O9"]D;60O;W!O=F5R
M+F, 9"]D;60O;W!O=F5R+F,-"BTM+2`N+B\N+B]G9&,M,"XX+V0O9&UD+V]P

M*RL 9"]D;60O;W!O=F5R+F,),C`P-"TQ,BTQ-2`Q.#HQ,SHR-RXX-C<P.3(V

M8BYH/ T*("-I;F-L=61E(#QC='EP92YH/ T*("-I;F-L=61E(#QA<W-E<G0N
M:#X-"BTC:6YC;'5D92`\8V]M<&QE>"YH/ T**R-I;F-L=61E(#QC;VUP;&5X
M/ T*(`T*("-I9F1E9B!?7T%04$Q%7U\-"B`C9&5F:6YE(&EN=&5G97)?="!D




M='EP92T^=&]"87-E='EP92 I.PT*("` ("!)9&5N=&EF:65R("II9"`](&]P
M260H*3L-"F1I9F8 +75R("XN+RXN+V=D8RTP+C O9"]D;60O<&%R<V4N8R!D





M/2`R+`DO+R!S=&%R="!A(&YE=R!S8V]P90T*("` ("!04V-U<FQY(#T -"P)
M+R\ >R!]('-T871E;65N="!I<R!R97%U:7)E9`T*+2` ("!04V-U<FQY<V-O









M="YH/ T**W1Y<&5D968 :6YT-C1?="!L;VYG;&]N9SL-"BMT>7!E9&5F('5I
M;G0V-%]T('5L;VYG;&]N9SL-"B`C96QS90T*('1Y<&5D968 ;&]N9R!L;VYG
M(&QO;F=L;VYG.PT*('1Y<&5D968 =6YS:6=N960 ;&]N9R!L;VYG('5L;VYG
M;&]N9SL-"D!`("TR,S,L,3` *S(S-RPQ,"!`0`T*("` ("`O+R!2971U<FX)

M/C`)=&AI<R`^(&8-"BT ("` :6YT($9I;&4Z.F-O;7!A<F54:6UE*$9I;&4 

M("\O(%)E860 <WES=&5M(&9I;&4 <W1A=&ES=&EC<PT*+2` ("!V;VED($9I


`
end



-----BEGIN PGP SIGNATURE-----

iD8DBQFBwHWr3w+/yD4P9tIRAs2HAJ9hoerxGQhfHxSdh02ZoOghOS05KACbBDv/
BFMafJkatVvqG9CN8mfXtC0=
=Jl6N
-----END PGP SIGNATURE-----
Dec 15 2004
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Thomas Kuehne wrote:

 The attached patch cleans (pedantic) compiler warnings experienced
 during GDC building.
When making the patch files, please make sure that the paths have the same amount of dirs. "patch" tends to get confused, otherwise... http://www.gnu.org/software/diffutils/manual/html_node/Making-Patches.html For instance, "diff -ur gdc-0.8.orig gdc-0.8" And patches usually have the ".patch" suffix ? Just some friendly suggestions, nothing more. --anders PS. Patch has problems with the DMD sources anyway, since they are using DOS line endings. I used a search and replace on the code first: find . -type f -name '*.[ch]' | xargs -n 1 -t perl -pe 's/\r\n/\n/s' -i Then the patch applied just fine, with "patch -p2"
Dec 16 2004
parent reply Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anders F Björklund schrieb am Thu, 16 Dec 2004 13:43:59 +0100:
 Thomas Kuehne wrote:

 The attached patch cleans (pedantic) compiler warnings experienced
 during GDC building.
When making the patch files, please make sure that the paths have the same amount of dirs. "patch" tends to get confused, otherwise...
Ups, I didn't clean up.
 PS. Patch has problems with the DMD sources
 anyway, since they are using DOS line endings.
May tools will - due to _mixed_ line endings in the GDC sources - freak ou.. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFBwZGH3w+/yD4P9tIRAq5GAKCHv94qbwnn8YI2UFCwjvPT2A936ACePR3Z RV09MmK68ZFuyNLqWj6JJx0= =GnWX -----END PGP SIGNATURE-----
Dec 16 2004
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Thomas Kuehne wrote:

PS. Patch has problems with the DMD sources
anyway, since they are using DOS line endings.
May tools will - due to _mixed_ line endings in the GDC sources - freak ou..
Indeed. And even in my editor that doesn't freak, it still looks funny since it treats UNIX line endings in a DOS text file like extra characters... DMD can probably remain as DOS/Windows CRLF in the Digital Mars distribution, but *should* be changed to UNIX line endings in the GDC distribution. IMHO. --anders
Dec 16 2004
parent reply John Reimer <brk_6502 yahoo.com> writes:
Anders F Björklund wrote:
 Thomas Kuehne wrote:
 
 PS. Patch has problems with the DMD sources
 anyway, since they are using DOS line endings.
May tools will - due to _mixed_ line endings in the GDC sources - freak ou..
Indeed. And even in my editor that doesn't freak, it still looks funny since it treats UNIX line endings in a DOS text file like extra characters... DMD can probably remain as DOS/Windows CRLF in the Digital Mars distribution, but *should* be changed to UNIX line endings in the GDC distribution. IMHO. --anders
It would seem that it's almost better to just change the source to UNIX line endings for both platforms. You would think that a good Windows editor would know how to read in a UNIX type text file with just a '\n' ending lines.
Dec 16 2004
parent reply John Reimer <brk_6502 yahoo.com> writes:
John Reimer wrote:
 Anders F Björklund wrote:
 
 Thomas Kuehne wrote:

 Indeed. And even in my editor that doesn't freak,
 it still looks funny since it treats UNIX line
 endings in a DOS text file like extra characters...

 DMD can probably remain as DOS/Windows CRLF in the
 Digital Mars distribution, but *should* be changed
 to UNIX line endings in the GDC distribution. IMHO.

 --anders
It would seem that it's almost better to just change the source to UNIX line endings for both platforms. You would think that a good Windows editor would know how to read in a UNIX type text file with just a '\n' ending lines.
Ahh.. But I guess I'm forgetting about what the editor will do when it writes the file back. Grr...
Dec 16 2004
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
John Reimer wrote:
 John Reimer wrote:
 
 Anders F Björklund wrote:

 Thomas Kuehne wrote:

 Indeed. And even in my editor that doesn't freak,
 it still looks funny since it treats UNIX line
 endings in a DOS text file like extra characters...

 DMD can probably remain as DOS/Windows CRLF in the
 Digital Mars distribution, but *should* be changed
 to UNIX line endings in the GDC distribution. IMHO.

 --anders
It would seem that it's almost better to just change the source to UNIX line endings for both platforms. You would think that a good Windows editor would know how to read in a UNIX type text file with just a '\n' ending lines.
Ahh.. But I guess I'm forgetting about what the editor will do when it writes the file back. Grr...
Well, if it does, it isn't a good editor. I only use editors where I can set the write back options (read Vim). Lars Ivar Igesund
Dec 16 2004
parent "Simon Buchan" <currently no.where> writes:
On Thu, 16 Dec 2004 21:58:06 +0100, Lars Ivar Igesund  
<larsivar igesund.net> wrote:

 John Reimer wrote:
 John Reimer wrote:

 Anders F Björklund wrote:

 Thomas Kuehne wrote:

 Indeed. And even in my editor that doesn't freak,
 it still looks funny since it treats UNIX line
 endings in a DOS text file like extra characters...

 DMD can probably remain as DOS/Windows CRLF in the
 Digital Mars distribution, but *should* be changed
 to UNIX line endings in the GDC distribution. IMHO.

 --anders
It would seem that it's almost better to just change the source to UNIX line endings for both platforms. You would think that a good Windows editor would know how to read in a UNIX type text file with just a '\n' ending lines.
Ahh.. But I guess I'm forgetting about what the editor will do when it writes the file back. Grr...
Well, if it does, it isn't a good editor. I only use editors where I can set the write back options (read Vim). Lars Ivar Igesund
If your editor can read \n newlines but not write them, you just found a M$ product. I currently use Crimson Editor on Windows, it does most of the stuff I really want in an editor, barring code awareness (a.k.a. Intellisense) and collapsing (very usefull for incredibly wordy classes) and some random crud like hex reading data files. Unfortunately, it's not open, so I can't try to derive some kind of semi-IDE from it (It's designed to be kind of like KDE's embedded editor, very lightweight, dumb, but helpfull, so it's unlikely the changes would be accepted in the main branch, if there were one) -- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up" -- "I plan on at least one critical patch every month, and I haven't been disappointed." - Adam Hansen, manager of security at Sonnenschein Nath & Rosenthal LLP (Quote from http://www.eweek.com/article2/0,1759,1736104,00.asp) -- "It's been a challenge to "reteach or retrain" Web users to pay for content, said Pizey" -Wired website: "The Incredible Shrinking Comic"
Dec 18 2004