mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
fix: supress GCC13 warnings (#24434)
* fix: supress GCC13 warnings * fix for review and compile-warning on MacOS
This commit is contained in:
@@ -142,6 +142,11 @@ namespace
|
||||
std::unordered_set<CycleCausers, CycleHasher> cycle_causers;
|
||||
};
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ == 13)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdangling-reference"
|
||||
#endif
|
||||
|
||||
bool canMerge(const GIslandModel::Graph &g,
|
||||
const ade::NodeHandle &a_nh,
|
||||
const ade::NodeHandle &slot_nh,
|
||||
@@ -191,6 +196,10 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ == 13)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
inline bool isProducedBy(const ade::NodeHandle &slot,
|
||||
const ade::NodeHandle &island)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,14 @@ namespace cv {
|
||||
namespace gapi {
|
||||
namespace wip {
|
||||
namespace onevpl {
|
||||
|
||||
// With gcc13, std::unique_ptr(FILE, decltype(&fclose)> causes ignored-attributes warning.
|
||||
// See https://stackoverflow.com/questions/76849365/can-we-add-attributes-to-standard-function-declarations-without-breaking-standar
|
||||
#if defined(__GNUC__) && (__GNUC__ == 13)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wignored-attributes"
|
||||
#endif
|
||||
|
||||
struct GAPI_EXPORTS FileDataProvider : public IDataProvider {
|
||||
|
||||
using file_ptr = std::unique_ptr<FILE, decltype(&fclose)>;
|
||||
@@ -34,6 +42,11 @@ private:
|
||||
mfx_codec_id_type codec;
|
||||
const uint32_t bitstream_data_size;
|
||||
};
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ == 13)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
} // namespace onevpl
|
||||
} // namespace wip
|
||||
} // namespace gapi
|
||||
|
||||
Reference in New Issue
Block a user