diff mbox series

gm2: add missing debug output guard

Message ID Zpy41GDciqmU2FU0@monster.localdomain
State New
Headers show
Series gm2: add missing debug output guard | expand

Commit Message

Wilken Gottwalt July 21, 2024, 7:29 a.m. UTC
The Close() procedure in MemStream is missing a guard to prevent it from
printing in non-debug mode.

gcc/gm2:
	* gm2-libs-iso/MemStream.mod: Guard debug output.

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
---
 gcc/m2/gm2-libs-iso/MemStream.mod | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Gaius Mulley July 23, 2024, 5:44 p.m. UTC | #1
Wilken Gottwalt <wilken.gottwalt@posteo.net> writes:

> The Close() procedure in MemStream is missing a guard to prevent it from
> printing in non-debug mode.
>
> gcc/gm2:
> 	* gm2-libs-iso/MemStream.mod: Guard debug output.
>
> Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
> ---
>  gcc/m2/gm2-libs-iso/MemStream.mod | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/m2/gm2-libs-iso/MemStream.mod b/gcc/m2/gm2-libs-iso/MemStream.mod
> index 9620ed2ba19..d3204692540 100644
> --- a/gcc/m2/gm2-libs-iso/MemStream.mod
> +++ b/gcc/m2/gm2-libs-iso/MemStream.mod
> @@ -694,7 +694,10 @@ END handlefree ;
>  
>  PROCEDURE Close (VAR cid: ChanId) ;
>  BEGIN
> -   printf ("Close called\n");
> +   IF Debugging
> +   THEN
> +      printf ("Close called\n")
> +   END ;
>     IF IsMem(cid)
>     THEN
>        UnMakeChan(did, cid) ;

many thanks!

regards,
Gaius
Gerald Pfeifer Aug. 10, 2024, 11:43 a.m. UTC | #2
On Tue, 23 Jul 2024, Gaius Mulley wrote:
>> gcc/gm2:
>> 	* gm2-libs-iso/MemStream.mod: Guard debug output.
> many thanks!

I noticed this has not been pushed yet and believe Wilken does not have 
write/push access - so just pushed this on his behalf.

Wilken, it may be good to note this as part of patch submission.

Gerald
Wilken Gottwalt Aug. 11, 2024, 6:59 a.m. UTC | #3
On Sat, 10 Aug 2024 13:43:33 +0200 (CEST)
Gerald Pfeifer <gerald@pfeifer.com> wrote:

> On Tue, 23 Jul 2024, Gaius Mulley wrote:
> >> gcc/gm2:
> >> 	* gm2-libs-iso/MemStream.mod: Guard debug output.
> > many thanks!
> 
> I noticed this has not been pushed yet and believe Wilken does not have 
> write/push access - so just pushed this on his behalf.
> 
> Wilken, it may be good to note this as part of patch submission.
> 
> Gerald

Thank for pushing this. But now I'm a bit confused. Why should I have write/push
access to official repos? All I do is sending in patches like I do on the LKML.
I also sent in two more patches to fix some Modula-2 libs warnings, which make
building with most warnings enabled (-W -Wall -Wextra) a bit annoying. Gerald,
should I cc you in the next patches I will send in?

greetings,
Wilken
Gaius Mulley Aug. 11, 2024, 6:45 p.m. UTC | #4
Wilken Gottwalt <wilken.gottwalt@posteo.net> writes:

> On Sat, 10 Aug 2024 13:43:33 +0200 (CEST)
> Gerald Pfeifer <gerald@pfeifer.com> wrote:
>
>> On Tue, 23 Jul 2024, Gaius Mulley wrote:
>> >> gcc/gm2:
>> >> 	* gm2-libs-iso/MemStream.mod: Guard debug output.
>> > many thanks!
>> 
>> I noticed this has not been pushed yet and believe Wilken does not have 
>> write/push access - so just pushed this on his behalf.
>> 
>> Wilken, it may be good to note this as part of patch submission.
>> 
>> Gerald
>
> Thank for pushing this. But now I'm a bit confused. Why should I have write/push
> access to official repos? All I do is sending in patches like I do on the LKML.
> I also sent in two more patches to fix some Modula-2 libs warnings, which make
> building with most warnings enabled (-W -Wall -Wextra) a bit annoying. Gerald,
> should I cc you in the next patches I will send in?
>
> greetings,
> Wilken

Ah I think the error is mine - I forgot to push the patch after okaying
it,

regards,
Gaius
Gerald Pfeifer Aug. 11, 2024, 6:54 p.m. UTC | #5
On Sun, 11 Aug 2024, Wilken Gottwalt wrote:
>> I noticed this has not been pushed yet and believe Wilken does not have 
>> write/push access - so just pushed this on his behalf.
>> 
>> Wilken, it may be good to note this as part of patch submission.
> Thank for pushing this. But now I'm a bit confused. Why should I have 
> write/push access to official repos?

First time contributors and occasional contributors indeed don't have push 
access to the official repos (and I did not mean to imply they should).

Rather what I meant was that it can be helpful noting this in a patch 
submission, something like "(I don't have write/push access.)", to make 
reviewers/appovers aware of the extra step.

> Gerald, should I cc you in the next patches I will send in?

If Gaius is happy to push your patches, that'd be best. I merely helped 
out here. :-) (If necessary, yes, happy to help again.)

Gerald
diff mbox series

Patch

diff --git a/gcc/m2/gm2-libs-iso/MemStream.mod b/gcc/m2/gm2-libs-iso/MemStream.mod
index 9620ed2ba19..d3204692540 100644
--- a/gcc/m2/gm2-libs-iso/MemStream.mod
+++ b/gcc/m2/gm2-libs-iso/MemStream.mod
@@ -694,7 +694,10 @@  END handlefree ;
 
 PROCEDURE Close (VAR cid: ChanId) ;
 BEGIN
-   printf ("Close called\n");
+   IF Debugging
+   THEN
+      printf ("Close called\n")
+   END ;
    IF IsMem(cid)
    THEN
       UnMakeChan(did, cid) ;