<div dir="ltr">FYI: this dashboard is looking better. I think I have all of the non-vtkDataArray template stuff taken care of in the XML writers and the flow path filters as well. I'll take a stab at the vtkPSLACReader. We have some new stuff with the vtkHyperTreeGrid changes but Dave DeMarle is actively working on that.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 17, 2017 at 11:29 AM, Allie Vacanti <span dir="ltr"><<a href="mailto:allison.vacanti@kitware.com" target="_blank">allison.vacanti@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I agree, the scope for disabling the warnings should be as small as<br>
possible -- Leave the warnings on, and then if we find one that's<br>
harmless, just push/pop the warnings around the template function. Ken<br>
pointed me at a few of these warnings a couple weeks ago and we ended<br>
up fixing a few real template resolution bugs these warnings uncovered<br>
that severely affected performance.<br>
<br>
I took a closer look through these and fixed a few harmless warnings<br>
that could be easily addressed without pragmas. See<br>
<a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/3163" rel="noreferrer" target="_blank">https://gitlab.kitware.com/<wbr>vtk/vtk/merge_requests/3163</a><br>
<br>
The vtkXMLWriter patch will probably still throw warnings after that<br>
MR is merged, but they can be safely ignored with the others. That<br>
patch just makes the optimization more robust in the case that e.g.<br>
vtkFloatArray is in the dispatch list, instead of<br>
vtkAOSDataArrayTemplate<float> (Generic template parameters are used<br>
before the compiler will check inheritance).<br>
<br>
There were two in places I'm not familiar with, so I'll leave those<br>
for someone more familiar with these classes:<br>
<br>
Filters/General/<wbr>vtkQuadraturePointsUtilities.<wbr>hxx:119<br>
Rendering/Context2D/<wbr>vtkContextActor.cxx:88<br>
<br>
The rest (overloads with AOS/SOA specific arguments) can be safely<br>
ignored. Sean, would you mind patching those? I don't have a suitable<br>
version of clang to test on so it'd probably faster if you could test<br>
locally. Most of those are in files generated from<br>
Common/Core/Testing/Cxx/<a href="http://TestDataArrayAPI.cxx.in" rel="noreferrer" target="_blank">TestDa<wbr>taArrayAPI.cxx.in</a>, so realistically<br>
there are only a couple places that need patching.<br>
<span class="HOEnZb"><font color="#888888"><br>
Allie<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, Aug 17, 2017 at 9:46 AM, Ken Martin <<a href="mailto:ken.martin@kitware.com">ken.martin@kitware.com</a>> wrote:<br>
> I think the warning is valuable. I do not believe it applies to general<br>
> class templates that have external linkage.<br>
><br>
> I believe in this case the error is specifically due to the fact the<br>
> templated function in question has internal linkage. By defining it inside<br>
> an anonymous namespace the templated function cannot be used anywhere else,<br>
> and yet it is unused. So the compiler warns us.<br>
><br>
> Potential fixes could be to<br>
><br>
> - pull that struct (CheckShallowCopy) out of the anonymous namespace (I<br>
> think that changes its linkage to external)<br>
><br>
> - do an ifdef to remove the function for this test case<br>
><br>
> - declare that function in CheckShallowCopy as extern forcing it to have<br>
> external linkage<br>
><br>
> I'm not 100% sure which if any of those solutions would work but that would<br>
> be my guess. Maybe Sean could give one of them a shot on his system?<br>
><br>
><br>
> Dave here is the llvm thread I looked at last time that talks a bit about<br>
> this<br>
><br>
> <a href="https://reviews.llvm.org/D29877" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D29877</a><br>
><br>
><br>
><br>
><br>
> On Wed, Aug 16, 2017 at 8:37 PM, David Cole via vtk-developers<br>
> <<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a>> wrote:<br>
>><br>
>> In this thread :<br>
>> <a href="http://public.kitware.com/pipermail/vtk-developers/2017-August/035314.html" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>pipermail/vtk-developers/2017-<wbr>August/035314.html</a><br>
>> , Ken Martin said<br>
>><br>
>> "the llvm folks added this due to some ODR violation checking.<br>
>> That having it unused can cause it to be defined multiple times in a<br>
>> translation unit for some reason."<br>
>><br>
>> Despite my Google skillz, I could not find what exactly he was<br>
>> referring to, and a search on the quoted "-Wunused-template" doesn't<br>
>> help much. Or I didn't dig deep enough.<br>
>><br>
>> Anyhow:<br>
>><br>
>> I think you should favor limiting the disabled bit of the warning to<br>
>> the scope where you know it's safe to ignore, and not just put a<br>
>> blanket suppression on it. Each warning is useful to somebody for some<br>
>> code, and ignoring them everywhere by a global compile flag is not the<br>
>> best way to suppress a warning in a handful of files among thousands.<br>
>><br>
>><br>
>> Just my opinion ... but there you have it.<br>
>><br>
>> David C.<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> On Wed, Aug 16, 2017 at 7:06 PM, Sean McBride <<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>><br>
>> wrote:<br>
>> > On Wed, 16 Aug 2017 13:54:26 -0400, Allie Vacanti said:<br>
>> ><br>
>> >>> Allison, do you think you can work on the data array warnings?<br>
>> >>><br>
>> >>> I think if both Allison and I take care of those it should whittle<br>
>> >>> down the<br>
>> >>> list to a more manageable size to start getting others to help out<br>
>> >>> with.<br>
>> >><br>
>> >>I think we should just disable the unused-template warnings. Most of<br>
>> >>these cases depend on the ArrayDispatch configuration and can't be<br>
>> >>removed without breaking features, even though some builds don't use<br>
>> >>them.<br>
>> ><br>
>> > Allie,<br>
>> ><br>
>> > OK, so we just have to decide if we should:<br>
>> > a) use "#pragma clang diagnostic ignored" to disable this warning for<br>
>> > the ArrayDispatch file(s)<br>
>> > or<br>
>> > b) I just add -Wno-unused-template to disable it everywhere and always<br>
>> ><br>
>> > I guess it depends if the warning is generally useful (except for the<br>
>> > funky case of ArrayDispatch stuff), or generally useless.<br>
>> ><br>
>> > Cheers,<br>
>> ><br>
>> > --<br>
>> > ______________________________<wbr>______________________________<br>
>> > Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
>> > Rogue Research <a href="http://www.rogue-research.com" rel="noreferrer" target="_blank">www.rogue-research.com</a><br>
>> > Mac Software Developer Montréal, Québec, Canada<br>
>> ><br>
>> ><br>
>> > ______________________________<wbr>_________________<br>
>> > Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>> ><br>
>> > Search the list archives at:<br>
>> > <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
>> ><br>
>> ______________________________<wbr>_________________<br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>><br>
>> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Ken Martin PhD<br>
> Distinguished Engineer<br>
> Kitware Inc.<br>
> 28 Corporate Drive<br>
> Clifton Park NY 12065<br>
><br>
> This communication, including all attachments, contains confidential and<br>
> legally privileged information, and it is intended only for the use of the<br>
> addressee. Access to this email by anyone else is unauthorized. If you are<br>
> not the intended recipient, any disclosure, copying, distribution or any<br>
> action taken in reliance on it is prohibited and may be unlawful. If you<br>
> received this communication in error please notify us immediately and<br>
> destroy the original message. Thank you.<br>
><br>
> ______________________________<wbr>_________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
><br>
><br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
<br>
</div></div></blockquote></div><br></div>