[PATCH v3 3/3] Add tests for the -l/--syscall-limit option

Dmitry V. Levin ldv at strace.io
Thu Mar 2 10:57:23 UTC 2023


On Thu, Mar 02, 2023 at 04:22:39PM +0530, Sahil Siddiq wrote:
> On Thursday, 2 March 2023 16:18:32 IST Dmitry V. Levin wrote:
> > On Thu, Mar 02, 2023 at 04:13:30PM +0530, Sahil Siddiq wrote:
> > > On Friday, 24 February 2023 23:45:58 IST Dmitry V. Levin wrote:
> > > > > +
> > > > > +int
> > > > > +main(int argc, char **argv)
> > > > > +{
> > > > > +       return syscall_limit_detach();
> > > > > +}
> > > > 
> > > > It would be better to declare main without arguments if they are not
> > > > going
> > > > to be used anyway.
> > > 
> > > I decided to declare main without arguments. When I run "make check", I
> > > get
> > > an error (-Werror=old-style-definition) stating that main() is an old
> > > style function definition.
> > 
> > Most of strace tests already declare main() without arguments.
> > All you need is to do it properly: int main(void).
> 
> Ah, I have understood this now. I should have used void in place of the
> arguments. Sorry, I'll fix that.

No problem.  I just wanted to highlight that relaxing a global check
for the need of a new test is not the best approach in general.


-- 
ldv


More information about the Strace-devel mailing list