tech-userlevel archive

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

Re: change signature of shquotev(3) ?



On Fri, Aug 18, 2017 at 02:48:42PM +0700, Robert Elz wrote:
>     Date:        Fri, 18 Aug 2017 01:55:39 +0200
>     From:        Joerg Sonnenberger <joerg%bec.de@localhost>
>     Message-ID:  <20170817235539.GA28917%britannica.bec.de@localhost>
> 
>   | This is sadly the canonical way to do it.
> 
> That is a pain...
> 
>   | With C cast rules, you can't win in this case.
> 
> Oh well...
> 
>   | C compilers will bitch about it.
> 
> gcc (on current) didn't.   I did test this before suggesting it.

Try the attached test case with -Wall.

Joerg
void testfun(const char *const *);

void
testcaller(void) {
  const char *argvec[10];
  char *argvec2[10];

  testfun(argvec);
  testfun(argvec2);
}


Home | Main Index | Thread Index | Old Index