[DTrace-devel] [PATCH 1/3] Fix "missing braces" message with older compilers
Nick Alcock
nick.alcock at oracle.com
Fri Dec 1 15:06:03 UTC 2023
On 30 Nov 2023, eugene loh uttered the following:
> From: Eugene Loh <eugene.loh at oracle.com>
>
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
> ---
> dtprobed/dtprobed.c | 2 +-
> libdtrace/dt_proc.c | 8 ++++----
> libdtrace/dt_symtab.c | 2 +-
> libport/daemonize.c | 2 +-
> 4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/dtprobed/dtprobed.c b/dtprobed/dtprobed.c
> index 507a412a..c2e93d48 100644
> --- a/dtprobed/dtprobed.c
> +++ b/dtprobed/dtprobed.c
> @@ -848,7 +848,7 @@ main(int argc, char *argv[])
> char *devname = "dtrace/helper";
> int sync_fd = -1;
> int ret;
> - struct sigaction sa = {0};
> + struct sigaction sa = {{0}};
This depends on an implementation detail of glibc (that struct sigaction
happens to have a union in it as the first member) just to get rid of a
pedantic warning. This feels... excessive to me?
How old are 'older compilers' anyway?
--
NULL && (void)
More information about the DTrace-devel
mailing list