Bug 244636 - archivers/upx: Fix build with clang 10.0.0
Summary: archivers/upx: Fix build with clang 10.0.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Max Khon
URL:
Keywords:
Depends on:
Blocks: 244251
  Show dependency treegraph
 
Reported: 2020-03-06 17:28 UTC by Dimitry Andric
Modified: 2020-03-17 18:36 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (fjoe)


Attachments
Adjust indentation in upx's LZMA parts (1.19 KB, patch)
2020-03-06 17:28 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2020-03-06 17:28:33 UTC
Created attachment 212196 [details]
Adjust indentation in upx's LZMA parts

As reported in bug 244251, with clang 10.0.0 the print/libraqm port runs into a -Werror warning:

In file included from compress_lzma.cpp:305:
./../src/lzma-sdk/C/7zip/Compress/LZMA/LZMAEncoder.cpp:971:9: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
        {
        ^
./../src/lzma-sdk/C/7zip/Compress/LZMA/LZMAEncoder.cpp:967:7: note: previous statement is here
      if (repIndex == 0)
      ^

The strange indentation is caused by a commented out if statement, which the 7-Zip author seems to be fond of.  Newer LZMA SDK drops have a totally different code structure, so I could not find any upstream commit that fixes this.

Therefore, I suggest to just shift the opening brace a bit to shut up the warning.
Comment 1 commit-hook freebsd_committer 2020-03-17 17:46:43 UTC
A commit references this bug:

Author: fjoe
Date: Tue Mar 17 17:45:47 UTC 2020
New revision: 528589
URL: https://svnweb.freebsd.org/changeset/ports/528589

Log:
  Fix build with clang 10

  PR:		244636
  Submitted by:	Dimitry Andric

Changes:
  head/archivers/upx/files/patch-src_lzma-sdk_C_7zip_Compress_LZMA_LZMAEncoder.cpp