Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Apr 2019 12:01:46 +0300
From:      Dmitry Chagin <dchagin@freebsd.org>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        Dmitry Chagin <dchagin@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>,  Ed Maste <emaste@freebsd.org>
Subject:   Re: stable/11 discards const qualifiers
Message-ID:  <CAC0jpUDskRz_NWnD5BKh%2BU6puYP1Vf87DmqBueG=8SpL=LsFXw@mail.gmail.com>
In-Reply-To: <EA13EF77-D0A6-4F3C-8F97-836ACE20035E@FreeBSD.org>
References:  <CAC0jpUDJ4JnCFHypkkkPdMTuJ36oXW%2BF4motXygLmJyiNfo7ow@mail.gmail.com> <EA13EF77-D0A6-4F3C-8F97-836ACE20035E@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
=D1=81=D0=B1, 27 =D0=B0=D0=BF=D1=80. 2019 =D0=B3. =D0=B2 14:01, Dimitry And=
ric <dim@freebsd.org>:

> On 25 Apr 2019, at 16:01, Dmitry Chagin <dchagin@freebsd.org> wrote:
> >
> > I'm trying to merge r331056, r331057, r331060, r331356,(by emaste@) to
> the
> > stable/11 and get the following error:
> >
> > =3D=3D=3D> linux (all)
> > cc  -O2 -pipe -DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32  -fno-strict-aliasing
> > -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS
> > -include
> >
> /usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/sys/GENERIC/opt_global=
.h
> > -I. -I/usr/home/dchagin/freebsd/sys -fno-common -g
> -fno-omit-frame-pointer
> > -mno-omit-leaf-frame-pointer
> > -I/usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/sys/GENERIC   -MD
> > -MF.depend.linux32_sysvec.o -MTlinux32_sysvec.o -mcmodel=3Dkernel
> > -mno-red-zone -mno-mmx -mno-sse -msoft-float
> > -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protecto=
r
> > -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef
> > -Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-=
dirs
> > -fdiagnostics-show-option -Wno-unknown-pragmas
> > -Wno-error-tautological-compare -Wno-error-empty-body
> > -Wno-error-parentheses-equality -Wno-error-unused-function
> > -Wno-error-pointer-sign -Wno-error-shift-negative-value
> > -Wno-error-address-of-packed-member  -mno-aes -mno-avx  -std=3Diso9899:=
1999
> > -c /usr/home/dchagin/freebsd/sys/amd64/linux32/linux32_sysvec.c -o
> > linux32_sysvec.o
> > /usr/home/dchagin/freebsd/sys/amd64/linux32/linux32_sysvec.c:322:29:
> > warning: taking address of packed member 'uc_sigmask' of class or
> structure
> > 'l_ucontext' may result in an unaligned pointer value
> > [-Waddress-of-packed-member]
> >        bsd_to_linux_sigset(mask, &frame.sf_sc.uc_sigmask);
> >                                   ^~~~~~~~~~~~~~~~~~~~~~
> > /usr/home/dchagin/freebsd/sys/amd64/linux32/linux32_sysvec.c:639:23:
> > warning: taking address of packed member 'uc_sigmask' of class or
> structure
> > 'l_ucontext' may result in an unaligned pointer value
> > [-Waddress-of-packed-member]
> >        linux_to_bsd_sigset(&uc.uc_sigmask, &bmask);
> >                             ^~~~~~~~~~~~~
> > /usr/home/dchagin/freebsd/sys/amd64/linux32/linux32_sysvec.c:912:15:
> error:
> > initializing 'int *' with an expression of type 'const int []' discards
> > qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
> >        .sv_errtbl      =3D linux_errtbl,
> >                          ^~~~~~~~~~~~
> > 2 warnings and 1 error generated.
> > *** Error code 1
> >
> > Is I'm missing something?
>
> Yes, please also merge r329787:
>
> ------------------------------------------------------------------------
> r329787 | emaste | 2018-02-22 02:59:59 +0100 (Thu, 22 Feb 2018) | 6 lines
>
> Use 'const int *' for sysentvec errno translation table
>
> This allows an sv_errtbl to be read-only .rodata.
>
> Sponsored by:   Turing Robotic Industries Inc.
>
>
Indeed, thank you, Dimitry!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC0jpUDskRz_NWnD5BKh%2BU6puYP1Vf87DmqBueG=8SpL=LsFXw>