<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hello Martin,</p>
    <p>We generate all the imports up front, before we know which ones
      will be needed in the file. We could probably cut down on some of
      them depending on the type of class being generated (e.g. struct
      vs. header file), but completely removing all unused imports would
      take a lot of effort. We essentially build up a source file from a
      series of source code snippets, so we'd have to manually track the
      imports that each snippet uses. I'm not sure if it's worth the
      effort just to get rid of the unused imports, tbh. My feeling is
      that, because we are mechanically generating code, even if we
      removed the unused imports, there will always be <i>some</i>
      oddities in the generated sources that you won't find in
      hand-written code (which might trigger warnings).<br>
    </p>
    <p>I think Christoph has some good suggestions for workarounds,
      particularly putting the generated sources in a separate folder
      with a different warning profile.<br>
    </p>
    <p>Jorn</p>
    <p></p>
    <div class="moz-cite-prefix">On 2-6-2024 21:27, Martin Pernollet
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:pCxBtK5KhMraZ2PgUt880Fn7zEbReUkExBgV78QpxTT43bGFGf94G9CTCle8etf0tl3pqk3zVFUdURQ2GBJwRufDZb3Bzlj38zX26SgypNY=@protonmail.com">
      
      <div style="font-family: Arial, sans-serif; font-size: 14px;">Hi,</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">There
        are lot of unused imports in JExtract generated code leading to
        lot of warnings.</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">That
        would be nice to get rid of them : PanamaGL has +100.000
        warnings in the bindings part :) </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><img alt="image.png" class="proton-embedded" src="cid:part1.rxTZvMKQ.89t5mMUc@oracle.com"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><img alt="image.png" class="proton-embedded" src="cid:part2.V5m4RiiW.CqWwlEuQ@oracle.com"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">Regards,</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">Martin</div>
      <div class="protonmail_signature_block" style="font-family: Arial, sans-serif; font-size: 14px;">
      </div>
    </blockquote>
  </body>
</html>