From 1a37f0db9279478c873fab46a27ff2699904e90d Mon Sep 17 00:00:00 2001
From: Michael Crawford <mdcrawford@gmail.com>
Date: Tue, 23 Feb 2016 20:13:54 -0800
Subject: [PATCH] Silence warning about possibly clobbered outFile due to
longjmp
---
build/jam/ArchitectureRules | 2 +-
src/add-ons/translators/jpeg/JPEGTranslator.cpp | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules
index 1736ab9..93d284a 100644
a
|
b
|
rule ArchitectureSetupWarnings architecture
|
609 | 609 | # EnableWerror src add-ons translators hpgs ; |
610 | 610 | EnableWerror src add-ons translators hvif ; |
611 | 611 | EnableWerror src add-ons translators ico ; |
612 | | # EnableWerror src add-ons translators jpeg ; # gcc2 |
| 612 | EnableWerror src add-ons translators jpeg ; # gcc2 |
613 | 613 | EnableWerror src add-ons translators jpeg2000 ; |
614 | 614 | EnableWerror src add-ons translators pcx ; |
615 | 615 | # EnableWerror src add-ons translators png ; # gcc2 |
diff --git a/src/add-ons/translators/jpeg/JPEGTranslator.cpp b/src/add-ons/translators/jpeg/JPEGTranslator.cpp
index e9b296d..e05faa2 100644
a
|
b
|
JPEGTranslator::DerivedIdentify(BPositionIO* inSource,
|
761 | 761 | |
762 | 762 | status_t |
763 | 763 | JPEGTranslator::DerivedTranslate(BPositionIO* inSource, |
764 | | const translator_info* inInfo, BMessage* ioExtension, uint32 outType, |
| 764 | const translator_info* inInfo, BMessage* ioExtension, volatile uint32 outType, |
765 | 765 | BPositionIO* outDestination, int32 baseType) |
766 | 766 | { |
| 767 | // Declaring outType to be volatile silencings warning about possible |
| 768 | // clobber due to longjmp |
| 769 | |
767 | 770 | // If no specific type was requested, convert to the interchange format |
768 | 771 | if (outType == 0) |
769 | 772 | outType = B_TRANSLATOR_BITMAP; |