From ac8c74699cba65d65f918b3f4cba2de64e039ada Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com>
Date: Thu, 14 Feb 2019 03:26:02 +0000
Subject: [PATCH] Fix GCC 9 OpenMP issues by drop default(none)

---
 dcraw_api.cc  | 4 ++--
 dcraw_indi.c  | 4 ----
 ufraw_ufraw.c | 6 +++---
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/dcraw_api.cc b/dcraw_api.cc
index 796e4a4..d33f030 100644
--- a/dcraw_api.cc
+++ b/dcraw_api.cc
@@ -900,7 +900,7 @@ extern "C" {
             rgbWB[3] = rgbWB[1];
         if (dark) {
 #ifdef _OPENMP
-            #pragma omp parallel for schedule(static) default(none) \
+            #pragma omp parallel for schedule(static) \
             shared(h,dark,rgbWB)
 #endif
             for (int i = 0; i < pixels; i++) {
@@ -913,7 +913,7 @@ extern "C" {
             }
         } else {
 #ifdef _OPENMP
-            #pragma omp parallel for schedule(static) default(none) \
+            #pragma omp parallel for schedule(static) \
             shared(h,dark,rgbWB)
 #endif
             for (int i = 0; i < pixels; i++) {
diff --git a/dcraw_indi.c b/dcraw_indi.c
index 9131eb9..a6e2a94 100644
--- a/dcraw_indi.c
+++ b/dcraw_indi.c
@@ -137,12 +137,10 @@ void CLASS wavelet_denoise_INDI(ushort(*image)[4], const int black,
 #ifdef _OPENMP
 #if defined(__sun) && !defined(__GNUC__)	/* Fix bug #3205673 - NKBJ */
     #pragma omp parallel for				\
-    default(none)					\
     shared(nc,image,size,noise)				\
     private(c,i,hpass,lev,lpass,row,col,thold,fimg,temp)
 #else
     #pragma omp parallel for				\
-    default(none)					\
     shared(nc,image,size)				\
     private(c,i,hpass,lev,lpass,row,col,thold,fimg,temp)
 #endif
@@ -413,7 +411,6 @@ void CLASS vng_interpolate_INDI(ushort(*image)[4], const unsigned filters,
     progress(PROGRESS_INTERPOLATE, -height);
 #ifdef _OPENMP
     #pragma omp parallel				\
-    default(none)					\
     shared(image,code,prow,pcol,h)			\
     private(row,col,g,brow,rowtmp,pix,ip,gval,diff,gmin,gmax,thold,sum,color,num,c,t)
 #endif
@@ -496,7 +493,6 @@ void CLASS ppg_interpolate_INDI(ushort(*image)[4], const unsigned filters,
 
 #ifdef _OPENMP
     #pragma omp parallel				\
-    default(none)					\
     shared(image,dir,diff)				\
     private(row,col,i,d,c,pix,guess)
 #endif
diff --git a/ufraw_ufraw.c b/ufraw_ufraw.c
index eee681c..516b4c7 100644
--- a/ufraw_ufraw.c
+++ b/ufraw_ufraw.c
@@ -1044,7 +1044,7 @@ static void ufraw_shave_hotpixels(ufraw_data *uf, dcraw_image_type *img,
     delta = rgbMax / (uf->conf->hotpixel + 1.0);
     count = 0;
 #ifdef _OPENMP
-    #pragma omp parallel for schedule(static) default(none) \
+    #pragma omp parallel for schedule(static) \
     shared(uf,img,width,height,colors,rgbMax,delta) \
 reduction(+:count) \
     private(h,p,w,c,t,v,hi,i)
@@ -1366,7 +1366,7 @@ static void ufraw_convert_reverse_wb(ufraw_data *uf, UFRawPhase phase)
         mul[i] = (guint64)0x10000 * 0x10000 / uf->developer->rgbWB[i];
     size = img->height * img->width;
 #ifdef _OPENMP
-    #pragma omp parallel for schedule(static) default(none) \
+    #pragma omp parallel for schedule(static) \
     shared(uf,phase,img,mul,size) \
     private(i,p16,c,px)
 #endif
@@ -1391,7 +1391,7 @@ static void ufraw_convert_image_tca(ufraw_data *uf, ufraw_image_data *img,
         return;
     int y;
 #ifdef _OPENMP
-    #pragma omp parallel for schedule(static) default(none) \
+    #pragma omp parallel for schedule(static) \
     shared(uf,img,outimg,area)
 #endif
     for (y = area->y; y < area->y + area->height; y++) {
