Merge pull request #2003 from bbbradsmith/large_align_false_positive_fix
supress spurious "large alignment" warnings
This commit is contained in:
@@ -306,7 +306,7 @@ void SegAlign (unsigned long Alignment, int FillVal)
|
||||
ActiveSeg->Align = CombinedAlignment;
|
||||
|
||||
/* Output a warning for larger alignments if not suppressed */
|
||||
if (CombinedAlignment >= LARGE_ALIGNMENT && !LargeAlignment) {
|
||||
if (CombinedAlignment >= LARGE_ALIGNMENT && CombinedAlignment > ActiveSeg->Align && CombinedAlignment > Alignment && !LargeAlignment) {
|
||||
Warning (0, "Combined alignment is suspiciously large (%lu)",
|
||||
CombinedAlignment);
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ Section* ReadSection (FILE* F, ObjData* O)
|
||||
"%lu. Last module requiring alignment was '%s'.",
|
||||
GetString (Name), Alignment, MAX_ALIGNMENT,
|
||||
GetObjFileName (O));
|
||||
} else if (Alignment >= LARGE_ALIGNMENT && !LargeAlignment) {
|
||||
} else if (Alignment >= LARGE_ALIGNMENT && Alignment > S->Alignment && Alignment > Sec->Alignment && !LargeAlignment) {
|
||||
Warning ("Combined alignment for segment '%s' is suspiciously "
|
||||
"large (%lu). Last module requiring alignment was '%s'.",
|
||||
GetString (Name), Alignment, GetObjFileName (O));
|
||||
|
||||
Reference in New Issue
Block a user