Re: [PATCH xserver] exa: promise not to touch the data when swapping pointers
On Wed, 2018-03-21 at 16:37 +, Eric Engestrom wrote: > Hmm, forgot to reply, sorry about that: > I've had the patch locally for just about forever, so I don't remember > exactly, but I think I hit some issue with one of the callers and when > I looked at the implementations I noticed this. I hit this warning early on in the meson conversion as well, and I think 712b02ec72 fixed it by getting HAVE_TYPEOF defined. Thanks for fixing the other half of it! - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] exa: promise not to touch the data when swapping pointers
On Wednesday, 2018-03-21 11:24:50 -0400, Adam Jackson wrote: > On Wed, 2018-03-14 at 15:37 +, Emil Velikov wrote: > > On 13 March 2018 at 10:55, Eric Engestromwrote: > > > exa/exa.c:525:10: warning: initialization discards ‘const’ qualifier from > > > pointer target type [-Wdiscarded-qualifiers] > > > swap(pExaGC, pGC, funcs); > > > ^ > > > > > > Signed-off-by: Eric Engestrom > > > --- > > > exa/exa_priv.h | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/exa/exa_priv.h b/exa/exa_priv.h > > > index ca4db720fbe871b50b7e..912e214789adba95c7fa 100644 > > > --- a/exa/exa_priv.h > > > +++ b/exa/exa_priv.h > > > @@ -244,7 +244,7 @@ extern DevPrivateKeyRec exaScreenPrivateKeyRec; > > > } > > > #else > > > #define swap(priv, real, mem) {\ > > > -void *tmp = priv->Saved##mem; \ > > > +const void *tmp = priv->Saved##mem; \ > > > > Hmm what compiler are you using - any clang/gcc should hit the HAVE_TYPEOF > > case. Hmm, forgot to reply, sorry about that: I've had the patch locally for just about forever, so I don't remember exactly, but I think I hit some issue with one of the callers and when I looked at the implementations I noticed this. The warning I put in the commit message was obtained by manually forcing the HAVE_TYPEOF case off. > > Regardless, the patch is spot on: > > > > Reviewed-by: Emil Velikov > > Merged,thanks: Cheers :) > > remote: Updating patchwork state for > https://patchwork.freedesktop.org/project/Xorg/list/ > remote: I: patch #210087 updated using rev > 610055809f4030bd0e7312c6b0c561fdfe6e0183. > remote: I: 1 patch(es) updated to state Accepted. > To ssh://git.freedesktop.org/git/xorg/xserver >d36128a72a..610055809f master -> master > > - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] exa: promise not to touch the data when swapping pointers
On Wed, 2018-03-14 at 15:37 +, Emil Velikov wrote: > On 13 March 2018 at 10:55, Eric Engestromwrote: > > exa/exa.c:525:10: warning: initialization discards ‘const’ qualifier from > > pointer target type [-Wdiscarded-qualifiers] > > swap(pExaGC, pGC, funcs); > > ^ > > > > Signed-off-by: Eric Engestrom > > --- > > exa/exa_priv.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/exa/exa_priv.h b/exa/exa_priv.h > > index ca4db720fbe871b50b7e..912e214789adba95c7fa 100644 > > --- a/exa/exa_priv.h > > +++ b/exa/exa_priv.h > > @@ -244,7 +244,7 @@ extern DevPrivateKeyRec exaScreenPrivateKeyRec; > > } > > #else > > #define swap(priv, real, mem) {\ > > -void *tmp = priv->Saved##mem; \ > > +const void *tmp = priv->Saved##mem; \ > > Hmm what compiler are you using - any clang/gcc should hit the HAVE_TYPEOF > case. > Regardless, the patch is spot on: > > Reviewed-by: Emil Velikov Merged,thanks: remote: Updating patchwork state for https://patchwork.freedesktop.org/project/Xorg/list/ remote: I: patch #210087 updated using rev 610055809f4030bd0e7312c6b0c561fdfe6e0183. remote: I: 1 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver d36128a72a..610055809f master -> master - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] exa: promise not to touch the data when swapping pointers
On 13 March 2018 at 10:55, Eric Engestromwrote: > exa/exa.c:525:10: warning: initialization discards ‘const’ qualifier from > pointer target type [-Wdiscarded-qualifiers] > swap(pExaGC, pGC, funcs); > ^ > > Signed-off-by: Eric Engestrom > --- > exa/exa_priv.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/exa/exa_priv.h b/exa/exa_priv.h > index ca4db720fbe871b50b7e..912e214789adba95c7fa 100644 > --- a/exa/exa_priv.h > +++ b/exa/exa_priv.h > @@ -244,7 +244,7 @@ extern DevPrivateKeyRec exaScreenPrivateKeyRec; > } > #else > #define swap(priv, real, mem) {\ > -void *tmp = priv->Saved##mem; \ > +const void *tmp = priv->Saved##mem; \ Hmm what compiler are you using - any clang/gcc should hit the HAVE_TYPEOF case. Regardless, the patch is spot on: Reviewed-by: Emil Velikov -Emil ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] exa: promise not to touch the data when swapping pointers
exa/exa.c:525:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] swap(pExaGC, pGC, funcs); ^ Signed-off-by: Eric Engestrom--- exa/exa_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exa/exa_priv.h b/exa/exa_priv.h index ca4db720fbe871b50b7e..912e214789adba95c7fa 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -244,7 +244,7 @@ extern DevPrivateKeyRec exaScreenPrivateKeyRec; } #else #define swap(priv, real, mem) {\ -void *tmp = priv->Saved##mem; \ +const void *tmp = priv->Saved##mem; \ priv->Saved##mem = real->mem; \ real->mem = tmp; \ } -- Cheers, Eric ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel