On 10 August 2012 at 15:09 Marc Balmer <m...@msys.ch> wrote:>
>
>
> Am 10.08.2012 um 15:55 schrieb "ch...@chriswareham.net"
> <ch...@chriswareham.net>:
>
> > Hi folks,
> >
> > I've taken into account peoples comments with regard to patch format and not
> > including changes that are just reformatting. The attached patch is solely
> > for imake, adding function prototypes where they are missing, limiting
> > linkage to static scope wherever possible and removing a bunch of GCC
> > warnings.
>
> Why do you make all functions static? This way, the debugger will no longer
> show the function names e.g. in a backtrace, iirc.
>
Really?
[chris@dante ~]$ cat test.c
#include <stdio.h>
static int
myfunc(void)
{
int i;
for (i = 0; i < 10; ++i)
printf("This is iteration %d\n.", i);
return i;
}
int
main(int argc, char *argv[])
{
myfunc();
return 0;
}
[chris@dante ~]$ gcc -g -o test test.c
[chris@dante ~]$ gdb test
GNU gdb (GDB) Fedora (7.4.50.20120120-49.fc17)
(gdb) b 6
Breakpoint 1 at 0x4004e4: file test.c, line 6.
(gdb) r
Starting program: /home/chris/test
Breakpoint 1, myfunc () at test.c:7
7 for (i = 0; i < 10; ++i)
The reason I make functions static is that it clearly marks them as not being
part of an API.
Regards,
Chris
> >
> > Regards,
> >
> > Chris
> >
> > <0001-Convert-function-prototypes-and-signatures-to-ANSI-f.patch>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel