Skip to content

ORC-1449: Add -Wno-unused-macros for Clang 14.0 - #1544

Closed
dongjoon-hyun wants to merge 1 commit into
apache:mainfrom
dongjoon-hyun:ORC-1449
Closed

dongjoon-hyun wants to merge 1 commit into
apache:mainfrom
dongjoon-hyun:ORC-1449

Conversation

@dongjoon-hyun

@dongjoon-hyun dongjoon-hyun commented Jun 21, 2023 •

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This PR aims to ignore unused-macro warning in Clang 14.0.

Why are the changes needed?

This is required to test on the latest Mac.

Environment

$ g++ --version
Apple clang version 14.0.0 (clang-1400.0.28.1)
...

BEFORE

$ make package test-out
...
/Users/dongjoon/APACHE/orc-merge/c++/src/CpuInfoUtil.cc:65:9: error: macro is not used [-Werror,-Wunused-macros]
#define UNUSED(x) (void)(x)
        ^
1 error generated.
make[2]: *** [c++/src/CMakeFiles/orc.dir/CpuInfoUtil.cc.o] Error 1
make[1]: *** [c++/src/CMakeFiles/orc.dir/all] Error 2
make: *** [all] Error 2

AFTER

make package test-out
...
100% tests passed, 0 tests failed out of 8

Total Test time (real) = 156.15 sec
Built target test-out

How was this patch tested?

Pass the CIs and manual tests on Clang 14.0.

@github-actions github-actions Bot added the BUILD label Jun 21, 2023
@dongjoon-hyun dongjoon-hyun added this to the 1.9.0 milestone Jun 21, 2023
@dongjoon-hyun

Copy link
Copy Markdown
Member Author

cc @williamhyun and @wgtmac

@dongjoon-hyun

Copy link
Copy Markdown
Member Author

Let me merge this for Apache ORC 1.9.0 preparation.

dongjoon-hyun added a commit that referenced this pull request Jun 22, 2023
### What changes were proposed in this pull request?

This PR aims to ignore `unused-macro` warning in Clang 14.0.

### Why are the changes needed?

This is required to test on the latest Mac.

**Environment**
```
$ g++ --version
Apple clang version 14.0.0 (clang-1400.0.28.1)
...
```

**BEFORE**
```
$ make package test-out
...
/Users/dongjoon/APACHE/orc-merge/c++/src/CpuInfoUtil.cc:65:9: error: macro is not used [-Werror,-Wunused-macros]
#define UNUSED(x) (void)(x)
        ^
1 error generated.
make[2]: *** [c++/src/CMakeFiles/orc.dir/CpuInfoUtil.cc.o] Error 1
make[1]: *** [c++/src/CMakeFiles/orc.dir/all] Error 2
make: *** [all] Error 2
```

**AFTER**
```
make package test-out
...
100% tests passed, 0 tests failed out of 8

Total Test time (real) = 156.15 sec
Built target test-out
```

### How was this patch tested?

Pass the CIs and manual tests on Clang 14.0.

Closes #1544 from dongjoon-hyun/ORC-1449.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit d7d2172)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
### What changes were proposed in this pull request?

This PR aims to ignore `unused-macro` warning in Clang 14.0.

### Why are the changes needed?

This is required to test on the latest Mac.

**Environment**
```
$ g++ --version
Apple clang version 14.0.0 (clang-1400.0.28.1)
...
```

**BEFORE**
```
$ make package test-out
...
/Users/dongjoon/APACHE/orc-merge/c++/src/CpuInfoUtil.cc:65:9: error: macro is not used [-Werror,-Wunused-macros]
#define UNUSED(x) (void)(x)
        ^
1 error generated.
make[2]: *** [c++/src/CMakeFiles/orc.dir/CpuInfoUtil.cc.o] Error 1
make[1]: *** [c++/src/CMakeFiles/orc.dir/all] Error 2
make: *** [all] Error 2
```

**AFTER**
```
make package test-out
...
100% tests passed, 0 tests failed out of 8

Total Test time (real) = 156.15 sec
Built target test-out
```

### How was this patch tested?

Pass the CIs and manual tests on Clang 14.0.

Closes apache#1544 from dongjoon-hyun/ORC-1449.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant