mirror of
https://review.haiku-os.org/haiku
synced 2025-02-23 05:58:31 +01:00
mail_daemon: warn about unused return value
GCC 13 warns that using the `begin()` method on a container is marked as `[[nodiscard]]`. This makes sure that this warning is not treated as an error. The code actually looks like it does not do much if anything of use. As a follow-up ticket #18478 is raised. Change-Id: Ie149f7e02cacda2bcd0be59617583605d5905747 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6655 Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
parent
26bda37ca5
commit
fef51dedd8
@ -408,10 +408,20 @@ IMAPFolder::RegisterPendingBodies(IMAP::MessageUIDList& uids,
|
||||
|
||||
IMAP::MessageUIDList::const_iterator iterator = uids.begin();
|
||||
for (; iterator != uids.end(); iterator++) {
|
||||
if (replyTo != NULL)
|
||||
if (replyTo != NULL) {
|
||||
fPendingBodies[*iterator].push_back(*replyTo);
|
||||
else
|
||||
} else {
|
||||
// Note: GCC 13 warns about the unused result of the statement below. This code should
|
||||
// be reviewed as part of #18478
|
||||
#if __GNUC__ == 13
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic warning "-Wunused-result"
|
||||
#endif
|
||||
fPendingBodies[*iterator].begin();
|
||||
#if __GNUC__ == 13
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user