bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] Cleaning up warnings


From: Sergey Poznyakoff
Subject: Re: [bug-inetutils] Cleaning up warnings
Date: Tue, 06 May 2008 10:23:00 +0300

Jeff Bailey <address@hidden> ha escrit:

> >  @@ -265,6 +265,7 @@ ls_main (argc, argv)
> >    if (f_longform || f_size)
> >      {
> >   #ifdef ORIGINAL_SOURCE
> >  +      int notused;
> >        if (!kflag)
> >         getbsize (&notused, &blocksize);
> >   #else
> 
> If we don't use this, can we just change getbsize to not require it?

We cannot: it is a library function on BSD and Darwin. It raises another
question, though. Similar `ifdef ORIGINAL_SOURCE' conditional blocks are
scattered all across the code in libls, but ORIGINAL_SOURCE itself is
never defined. So, the question is: do we need them at all? Removing
them will certainly improve readability and, as it seems, won't hurt
functionality. 

> >  @@ -216,10 +216,12 @@ static struct
> >    int modnum;
> >   } debug_mode[debug_max_mode] =
> >   {
> >  -"options", debug_options,
> >  -    "report", debug_report,
> >  -    "netdata", debug_net_data,
> >  -    "ptydata", debug_pty_data, "auth", debug_auth,};
> >  +  {"options", debug_options},
> >  +  {"report", debug_report},
> >  +  {"netdata", debug_net_data},
> >  +  {"ptydata", debug_pty_data},
> >  +  {"auth", debug_auth}
> >  +};
> 
> Memory is failing me here - is this the C99 way of handling a
> structure?

No, it is a normal way of defining an array of structures, even in K&R :^)

Regards,
Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]