Skip to content

Commit 1c8ba24

Browse files
committed
[flang] Silence warning in release builds
/home/david.spickett/llvm-project/flang/include/flang/Runtime/descriptor.h:458:30: warning: variable 'addendum' set but not used [-Wunused-but-set-variable] 458 | if (DescriptorAddendum * addendum{descriptor().Addendum()}) { | The if body is purely asserts.
1 parent cf5a8b4 commit 1c8ba24

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flang/include/flang/Runtime/descriptor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ class alignas(Descriptor) StaticDescriptor {
456456
assert(descriptor().rank() <= maxRank);
457457
assert(descriptor().SizeInBytes() <= byteSize);
458458
if (DescriptorAddendum * addendum{descriptor().Addendum()}) {
459+
(void)addendum;
459460
assert(hasAddendum);
460461
assert(addendum->LenParameters() <= maxLengthTypeParameters);
461462
} else {

0 commit comments

Comments
 (0)