[PATCH v3 3/3] Add tests for the -l/--syscall-limit option
Sahil Siddiq
icegambit91 at gmail.com
Thu Mar 2 10:43:30 UTC 2023
Hi,
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.
On Thursday, 2 March 2023 05:54:31 IST Dmitry V. Levin wrote:
> On Thu, Mar 02, 2023 at 03:08:44AM +0530, Sahil Siddiq wrote:
> [...]
>
> > diff --git a/m4/st_warn_cflags.m4 b/m4/st_warn_cflags.m4
> > index e226cadb8..dfc59e499 100644
> > --- a/m4/st_warn_cflags.m4
> > +++ b/m4/st_warn_cflags.m4
> > @@ -60,6 +60,7 @@ AC_ARG_ENABLE([gcc-Werror],
> >
> > [enable_gcc_Werror="$st_cv_enable_Werror"])
> >
> > if test "$enable_gcc_Werror" = yes; then
> >
> > gl_WARN_ADD([-Werror])
> >
> > + gl_WARN_ADD([-Wno-error=old-style-definition])
>
> Sorry, why do you need this? We don't use old style definitions, do we?
I added this option to ignore the old-style-definition error. The alternative would
be to declare main() with the arguments. I don't think there is any other place
where main() has been declared without the arguments.
Thanks,
Sahil
More information about the Strace-devel
mailing list