* [PATCH] Add missing prototype in gdbtk.c
@ 2012-03-19 12:10 Roland Schwingel
2012-03-29 23:02 ` Keith Seitz
0 siblings, 1 reply; 7+ messages in thread
From: Roland Schwingel @ 2012-03-19 12:10 UTC (permalink / raw)
To: insight
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
Hi...
In gdbtk.c there is a protoype missing for the windows only function
close_bfds(). This is required due to recently enabled
-Wmissing-prototype compilation.
Changelog:
2012-03-19 Roland Schwingel <roland.schwingel@onevision.com>
* generic/gdbtk.c: Add prototype for close_bfds().
Any comments? Is this ok?
Roland
[-- Attachment #2: missing_prototype_gdbtk.c.patch --]
[-- Type: text/plain, Size: 518 bytes --]
Index: //subnet-homes/Entwicklung/User/roland/local/gdb/head/source/gdb/gdbtk/generic/gdbtk.c
===================================================================
--- //subnet-homes/Entwicklung/User/roland/local/gdb/head/source/gdb/gdbtk/generic/gdbtk.c (revision 115571)
+++ //subnet-homes/Entwicklung/User/roland/local/gdb/head/source/gdb/gdbtk/generic/gdbtk.c (working copy)
@@ -165,6 +165,8 @@
* this will cost us if and when we need to reopen it.
*/
+extern void close_bfds (void);
+
void
close_bfds ()
{
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add missing prototype in gdbtk.c
2012-03-19 12:10 [PATCH] Add missing prototype in gdbtk.c Roland Schwingel
@ 2012-03-29 23:02 ` Keith Seitz
2012-03-30 13:03 ` Pierre Muller
0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2012-03-29 23:02 UTC (permalink / raw)
To: Roland Schwingel; +Cc: insight
On 03/19/2012 05:10 AM, Roland Schwingel wrote:
> Changelog:
>
> 2012-03-19 Roland Schwingel <roland.schwingel@onevision.com>
>
> * generic/gdbtk.c: Add prototype for close_bfds().
>
> Any comments? Is this ok?
Hmm. There already appears to be a declaration for this in gdbtk.h:
#ifdef _WIN32
extern void close_bfds ();
#endif /* _WIN32 */
Perhaps that check needs updating to "#if defined(_WIN32) ||
defined(_WIN64)"?
[Consider that change pre-approved with updated ChangeLog entry.]
Keith
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] Add missing prototype in gdbtk.c
2012-03-29 23:02 ` Keith Seitz
@ 2012-03-30 13:03 ` Pierre Muller
2012-03-30 13:10 ` Keith Seitz
0 siblings, 1 reply; 7+ messages in thread
From: Pierre Muller @ 2012-03-30 13:03 UTC (permalink / raw)
To: 'Keith Seitz', 'Roland Schwingel'; +Cc: insight
In fact, the same error also appears when
trying to compile a mingw32 version.
I hope that I found the reason:
Prototypes apparently require (void) instead of ().
The following patch fixes the problem for mingw32,
Is this patch OK?
Pierre Muller
GDB pascal language maintainer
2012-03-30 Pierre Muller <muller@ics.u-strasbg.fr>
* generic/gdbtk.h (close_bfds): Fox prototype.
Index: generic/gdbtk.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.h,v
retrieving revision 1.13
diff -u -p -r1.13 gdbtk.h
--- generic/gdbtk.h 2 Sep 2008 17:29:23 -0000 1.13
+++ generic/gdbtk.h 30 Mar 2012 12:53:48 -0000
@@ -165,7 +165,7 @@ extern int gdbtk_disable_fputs;
extern ptid_t gdbtk_get_ptid (void);
#ifdef _WIN32
-extern void close_bfds ();
+extern void close_bfds (void);
#endif /* _WIN32 */
extern void
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add missing prototype in gdbtk.c
2012-03-30 13:03 ` Pierre Muller
@ 2012-03-30 13:10 ` Keith Seitz
2012-03-30 13:32 ` Pierre Muller
0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2012-03-30 13:10 UTC (permalink / raw)
To: Pierre Muller; +Cc: insight
On 03/30/2012 06:02 AM, Pierre Muller wrote:
> I hope that I found the reason:
> Prototypes apparently require (void) instead of ().
That's interesting...
> The following patch fixes the problem for mingw32,
>
> Is this patch OK?
>
Sure, you could consider a clean-up like that obvious. [I try to use the
same "rules" gdb uses. It's what I'm used to.]
Thank you, Pierre!
Keith
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] Add missing prototype in gdbtk.c
2012-03-30 13:10 ` Keith Seitz
@ 2012-03-30 13:32 ` Pierre Muller
0 siblings, 0 replies; 7+ messages in thread
From: Pierre Muller @ 2012-03-30 13:32 UTC (permalink / raw)
To: 'Keith Seitz', 'Roland Schwingel'; +Cc: insight
>> Prototypes apparently require (void) instead of ().
>
>That's interesting...
>
>> The following patch fixes the problem for mingw32,
>>
>> Is this patch OK?
>>
>
>Sure, you could consider a clean-up like that obvious. [I try to use the
same "rules" gdb uses. It's what I'm >used to.]
>
>Thank you, Pierre!
I wasn't sure about the fact that this is a real
Prototype requirement or not, so I wanted to ask anyway...
Patch committed.
Roland, could you please confirm that
this also works for mingw64.
By the way, I got a working insight for mingw32,
which I was unable to get for a lllloooonnngggg time!
A really big thank to Roland for this!
Pierre
PS: I treid to compiled a mingw64 version of insight,
but I get failures here:
make[1]: Entering directory
`/usr/local/src/gdbcvs/build-insight-mingw64/tcl'
make[2]: Entering directory
`/usr/local/src/gdbcvs/build-insight-mingw64/tcl/win'
x86_64-w64-mingw32-gcc -c -gstabs+ -O0 -D__USE_MINGW_ACCESS -Wall
-Wconversion -I"../../../src/tcl/win/../generic" -I"
../../../src/tcl/win" -mwin32 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -
DPACKAGE_BUGREPORT=\"\" -DHAVE_NO_SEH=1 -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHA
VE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DBUILD_tcl
../../../src/tcl/win/../generic/tclCmdAH.c -o tclCmdAH.o
../../../src/tcl/win/../generic/tclCmdAH.c: In function 'Tcl_FileObjCmd':
../../../src/tcl/win/../generic/tclCmdAH.c:827:18: error: storage size of
'buf' isn't known
../../../src/tcl/win/../generic/tclCmdAH.c:827:18: warning: unused variable
'buf'
../../../src/tcl/win/../generic/tclCmdAH.c:921:18: error: storage size of
'buf' isn't known
../../../src/tcl/win/../generic/tclCmdAH.c:921:18: warning: unused variable
'buf'
../../../src/tcl/win/../generic/tclCmdAH.c:935:18: error: storage size of
'buf' isn't known
../../../src/tcl/win/../generic/tclCmdAH.c:935:18: warning: unused variable
'buf'
../../../src/tcl/win/../generic/tclCmdAH.c:1050:18: error: storage size of
'buf' isn't known
../../../src/tcl/win/../generic/tclCmdAH.c:1050:18: warning: unused variable
'buf'
../../../src/tcl/win/../generic/tclCmdAH.c:1063:18: error: storage size of
'buf' isn't known
../../../src/tcl/win/../generic/tclCmdAH.c:1063:18: warning: unused variable
'buf'
../../../src/tcl/win/../generic/tclCmdAH.c:1138:18: error: storage size of
'buf' isn't known
../../../src/tcl/win/../generic/tclCmdAH.c:1138:18: warning: unused variable
'buf'
../../../src/tcl/win/../generic/tclCmdAH.c:1222:4: warning: conversion to
'size_t' from 'int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:1258:18: error: storage size of
'buf' isn't known
../../../src/tcl/win/../generic/tclCmdAH.c:1258:18: warning: unused variable
'buf'
../../../src/tcl/win/../generic/tclCmdAH.c:1279:18: error: storage size of
'buf' isn't known
../../../src/tcl/win/../generic/tclCmdAH.c:1279:18: warning: unused variable
'buf'
../../../src/tcl/win/../generic/tclCmdAH.c:1348:18: error: storage size of
'buf' isn't known
../../../src/tcl/win/../generic/tclCmdAH.c:1348:18: warning: unused variable
'buf'
../../../src/tcl/win/../generic/tclCmdAH.c: In function 'StoreStatData':
../../../src/tcl/win/../generic/tclCmdAH.c:1514:5: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c:1520:5: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c:1521:5: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c:1522:5: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c:1523:5: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c:1524:5: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c:1528:5: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c:1529:5: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c:1530:5: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c:1531:36: error: dereferencing
pointer to incomplete type
../../../src/tcl/win/../generic/tclCmdAH.c: In function 'Tcl_ForeachObjCmd':
../../../src/tcl/win/../generic/tclCmdAH.c:1739:2: warning: conversion to
'long long unsigned int' from 'int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:1739:2: warning: conversion to
'unsigned int' from 'long long unsigned int' may alter its value
../../../src/tcl/win/../generic/tclCmdAH.c:1755:2: warning: conversion to
'long long unsigned int' from 'int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:1755:2: warning: conversion to
'unsigned int' from 'long long unsigned int' may alter its value
../../../src/tcl/win/../generic/tclCmdAH.c:1756:2: warning: conversion to
'long long unsigned int' from 'int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:1756:2: warning: conversion to
'unsigned int' from 'long long unsigned int' may alter its value
../../../src/tcl/win/../generic/tclCmdAH.c:1757:2: warning: conversion to
'long long unsigned int' from 'int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:1757:2: warning: conversion to
'unsigned int' from 'long long unsigned int' may alter its value
../../../src/tcl/win/../generic/tclCmdAH.c:1758:2: warning: conversion to
'long long unsigned int' from 'int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:1758:2: warning: conversion to
'unsigned int' from 'long long unsigned int' may alter its value
../../../src/tcl/win/../generic/tclCmdAH.c:1759:2: warning: conversion to
'long long unsigned int' from 'int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:1759:2: warning: conversion to
'unsigned int' from 'long long unsigned int' may alter its value
../../../src/tcl/win/../generic/tclCmdAH.c: In function 'Tcl_FormatObjCmd':
../../../src/tcl/win/../generic/tclCmdAH.c:2028:6: warning: conversion to
'int' from 'long long int' may alter its value
../../../src/tcl/win/../generic/tclCmdAH.c:2058:6: warning: conversion to
'int' from 'long unsigned int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:2098:6: warning: conversion to
'int' from 'long unsigned int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:2141:6: warning: conversion to
'int' from 'long unsigned int' may change the sign of the result
../../../src/tcl/win/../generic/tclCmdAH.c:2230:3: warning: conversion to
'int' from 'long long int' may alter its value
../../../src/tcl/win/../generic/tclCmdAH.c:2346:7: warning: conversion to
'int' from 'long long int' may alter its value
Makefile:423: recipe for target `tclCmdAH.o' failed
make[2]: *** [tclCmdAH.o] Error 1
make[2]: Leaving directory
`/usr/local/src/gdbcvs/build-insight-mingw64/tcl/win'
Makefile:15: recipe for target `all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/gdbcvs/build-insight-mingw64/tcl'
Makefile:7209: recipe for target `all-tcl' failed
make: *** [all-tcl] Error 2
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] Add missing prototype in gdbtk.c
@ 2012-03-30 13:48 Roland Schwingel
0 siblings, 0 replies; 7+ messages in thread
From: Roland Schwingel @ 2012-03-30 13:48 UTC (permalink / raw)
To: Pierre Muller, insight, Keith Seitz
Hi Pierre...
insight-owner@sourceware.org wrote on 30.03.2012 15:31:24:
>
> I wasn't sure about the fact that this is a real
> Prototype requirement or not, so I wanted to ask anyway...
>
> Patch committed.
>
> Roland, could you please confirm that
> this also works for mingw64.
You have been faster than me on this...
Yes it works here, too - as already replied in my other post.
>
> By the way, I got a working insight for mingw32,
> which I was unable to get for a lllloooonnngggg time!
> A really big thank to Roland for this!
You are welcome. I am also happy to have both a 32bit and 64bit insight!
It was worth the effort.
> PS: I treid to compiled a mingw64 version of insight,
> but I get failures here:
There is IMHO no way to get insight running on 64bit windows using the
current intree tcl/tk 8.4. I am using tcl/tk 8.6 for this. I am not done
with sending all my patches for building a 64bit windows insight. There
is still some way to go!
See my description here
http://sourceware.org/ml/insight/2012-q1/msg00050.html
and here
http://sourceware.org/ml/insight/2012-q1/msg00017.html
If you like to I can supply you a 64bit binary (but have to check
whether I have enabled pascal in my gdb sources ;-)
Roland
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] Add missing prototype in gdbtk.c
@ 2012-03-30 13:36 Roland Schwingel
0 siblings, 0 replies; 7+ messages in thread
From: Roland Schwingel @ 2012-03-30 13:36 UTC (permalink / raw)
To: Keith Seitz, insight
Hi ...
"Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr> wrote on 30.03.2012
15:02:30:
> In fact, the same error also appears when
> trying to compile a mingw32 version.
>
> I hope that I found the reason:
> Prototypes apparently require (void) instead of ().
>
> The following patch fixes the problem for mingw32,
>
> Is this patch OK?
Ah yes that's it. I got the error and thought that there would be no
prototype at all. Work here now too and so obsoletes my patch.
Roland
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-30 13:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 12:10 [PATCH] Add missing prototype in gdbtk.c Roland Schwingel
2012-03-29 23:02 ` Keith Seitz
2012-03-30 13:03 ` Pierre Muller
2012-03-30 13:10 ` Keith Seitz
2012-03-30 13:32 ` Pierre Muller
2012-03-30 13:36 Roland Schwingel
2012-03-30 13:48 Roland Schwingel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).