Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* bogus main declaration in gdb.base/label.c
@ 2013-01-14 20:52 David Blaikie
  2013-01-14 21:29 ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: David Blaikie @ 2013-01-14 20:52 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

The declaration of main in gdb.base/label.c is incorrect & fails to
compile under Clang:

../../../src/gdb/7.5/gdb/testsuite/gdb.base/label.c:4:1: error: second
parameter of 'main' (argument array) must be of type 'char **'
main (int argc, char *argv)
^

The attached patch fixes this by adding the missing '*' to the second parameter.

[-- Attachment #2: gdb-label.diff --]
[-- Type: application/octet-stream, Size: 307 bytes --]

diff --git gdb/testsuite/gdb.base/label.c gdb/testsuite/gdb.base/label.c
index f9cd8c3..c15e3bf 100644
--- gdb/testsuite/gdb.base/label.c
+++ gdb/testsuite/gdb.base/label.c
@@ -1,7 +1,7 @@
 #include <stdio.h>
 
 int
-main (int argc, char *argv)
+main (int argc, char **argv)
 {
   int i = 0;
   goto there;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bogus main declaration in gdb.base/label.c
  2013-01-14 20:52 bogus main declaration in gdb.base/label.c David Blaikie
@ 2013-01-14 21:29 ` Tom Tromey
  2013-01-15 18:07   ` David Blaikie
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2013-01-14 21:29 UTC (permalink / raw)
  To: David Blaikie; +Cc: gdb-patches

>>>>> "David" == David Blaikie <dblaikie@gmail.com> writes:

David> The declaration of main in gdb.base/label.c is incorrect & fails to
David> compile under Clang:

David> ../../../src/gdb/7.5/gdb/testsuite/gdb.base/label.c:4:1: error: second
David> parameter of 'main' (argument array) must be of type 'char **'
David> main (int argc, char *argv)
David> ^

David> The attached patch fixes this by adding the missing '*' to the
David> second parameter.

It needs a ChangeLog entry, but otherwise is ok.

If you're going to submit more patches, you should start the copyright
assignment process.  Send me email off-list & I will send you what you
need.

Tom


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bogus main declaration in gdb.base/label.c
  2013-01-14 21:29 ` Tom Tromey
@ 2013-01-15 18:07   ` David Blaikie
  2013-01-15 18:18     ` Sergio Durigan Junior
  0 siblings, 1 reply; 6+ messages in thread
From: David Blaikie @ 2013-01-15 18:07 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On Mon, Jan 14, 2013 at 1:28 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "David" == David Blaikie <dblaikie@gmail.com> writes:
>
> David> The declaration of main in gdb.base/label.c is incorrect & fails to
> David> compile under Clang:
>
> David> ../../../src/gdb/7.5/gdb/testsuite/gdb.base/label.c:4:1: error: second
> David> parameter of 'main' (argument array) must be of type 'char **'
> David> main (int argc, char *argv)
> David> ^
>
> David> The attached patch fixes this by adding the missing '*' to the
> David> second parameter.
>
> It needs a ChangeLog entry, but otherwise is ok.

Still a little fuzzy on ChangeLog entries, especially for patches
(following the contribution documentation it ends up pointing at
threads like this: http://gcc.gnu.org/ml/gcc/2000-09/msg00290.html (
from http://gcc.gnu.org/codingconventions.html#ChangeLogs ))

    * testsuite/gdb.base/label.c: Correct the type of the second
parameter to main.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bogus main declaration in gdb.base/label.c
  2013-01-15 18:07   ` David Blaikie
@ 2013-01-15 18:18     ` Sergio Durigan Junior
  2013-01-15 18:33       ` David Blaikie
  0 siblings, 1 reply; 6+ messages in thread
From: Sergio Durigan Junior @ 2013-01-15 18:18 UTC (permalink / raw)
  To: David Blaikie; +Cc: Tom Tromey, gdb-patches

On Tuesday, January 15 2013, David Blaikie wrote:

> Still a little fuzzy on ChangeLog entries, especially for patches
> (following the contribution documentation it ends up pointing at
> threads like this: http://gcc.gnu.org/ml/gcc/2000-09/msg00290.html (
> from http://gcc.gnu.org/codingconventions.html#ChangeLogs ))
>
>     * testsuite/gdb.base/label.c: Correct the type of the second
> parameter to main.

Hi David,

Thanks for your contribution.  The ChangeLog needs to be written
according to the GNU Coding Standards (as you have noticed).  The best
way to learn how to write an entry for them is to take a look at the
existing ChangeLogs: gdb/ChangeLog is a good source of information :-).
In your specific case, there is a ChangeLog file in gdb/testsuite, so
you don't need to include the prefix `testsuite/' in your entry.

Anyway, you would write your entry as:

2013-01-15  David Blaikie  <dblaikie@gmail.com>

	* gdb.base/label.c (main): Correct the type of the second
	parameter.

Or something like that.

Thanks,

-- 
Sergio


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bogus main declaration in gdb.base/label.c
  2013-01-15 18:18     ` Sergio Durigan Junior
@ 2013-01-15 18:33       ` David Blaikie
  2013-01-17 17:29         ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: David Blaikie @ 2013-01-15 18:33 UTC (permalink / raw)
  To: Sergio Durigan Junior; +Cc: Tom Tromey, gdb-patches

On Tue, Jan 15, 2013 at 10:18 AM, Sergio Durigan Junior
<sergiodj@redhat.com> wrote:
> On Tuesday, January 15 2013, David Blaikie wrote:
>
>> Still a little fuzzy on ChangeLog entries, especially for patches
>> (following the contribution documentation it ends up pointing at
>> threads like this: http://gcc.gnu.org/ml/gcc/2000-09/msg00290.html (
>> from http://gcc.gnu.org/codingconventions.html#ChangeLogs ))
>>
>>     * testsuite/gdb.base/label.c: Correct the type of the second
>> parameter to main.
>
> Hi David,
>
> Thanks for your contribution.  The ChangeLog needs to be written
> according to the GNU Coding Standards (as you have noticed).  The best
> way to learn how to write an entry for them is to take a look at the
> existing ChangeLogs: gdb/ChangeLog is a good source of information :-).
> In your specific case, there is a ChangeLog file in gdb/testsuite, so
> you don't need to include the prefix `testsuite/' in your entry.

Ah, hadn't realized there were narrower ChangeLogs (& I'd seen some
ChangeLog entries without author prefixes and some with). Thanks for
the tips/corrections.

> Anyway, you would write your entry as:
>
> 2013-01-15  David Blaikie  <dblaikie@gmail.com>
>
>         * gdb.base/label.c (main): Correct the type of the second
>         parameter.
>
> Or something like that.
>
> Thanks,
>
> --
> Sergio


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bogus main declaration in gdb.base/label.c
  2013-01-15 18:33       ` David Blaikie
@ 2013-01-17 17:29         ` Tom Tromey
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2013-01-17 17:29 UTC (permalink / raw)
  To: David Blaikie; +Cc: Sergio Durigan Junior, gdb-patches

>>>>> "David" == David Blaikie <dblaikie@gmail.com> writes:

David> Ah, hadn't realized there were narrower ChangeLogs (& I'd seen some
David> ChangeLog entries without author prefixes and some with). Thanks for
David> the tips/corrections.

The patch is ok with Sergio's ChangeLog entry.

Contact me off-list and I can set you up with write-after-approval
access.

Tom


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-17 17:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-14 20:52 bogus main declaration in gdb.base/label.c David Blaikie
2013-01-14 21:29 ` Tom Tromey
2013-01-15 18:07   ` David Blaikie
2013-01-15 18:18     ` Sergio Durigan Junior
2013-01-15 18:33       ` David Blaikie
2013-01-17 17:29         ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox