Opened 9 years ago
Closed 9 years ago
#5790 closed defect (fixed)
Unused templates in gdalwarpkernel
Reported by: | Kurt Schwehr | Owned by: | Kurt Schwehr |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | |
Cc: |
Description
Is there a case where the these two templates are actually used?
(cd alg; /Applications/Xcode.app/Contents/Developer/usr/bin/make) /bin/sh /Users/schwehr/src/gdal/gdal/libtool --mode=compile --tag=CXX g++ -Wall -Wextra -Werror -I/Users/schwehr/src/gdal/gdal/port -I/Users/schwehr/src/gdal/gdal/gcore -I/Users/schwehr/src/gdal/gdal/alg -I/Users/schwehr/src/gdal/gdal/ogr -I/Users/schwehr/src/gdal/gdal/ogr/ogrsf_frmts -g -O2 -Wall -DHAVE_SSE_AT_COMPILE_TIME -DHAVE_AVX_AT_COMPILE_TIME -DOGR_ENABLED -I/sw/include -I/Users/schwehr/src/gdal/gdal/port -I/sw/include -I/sw -I/sw/include -DGDAL_COMPILATION -c -o gdalwarpkernel.lo gdalwarpkernel.cpp libtool: compile: g++ -Wall -Wextra -Werror -I/Users/schwehr/src/gdal/gdal/port -I/Users/schwehr/src/gdal/gdal/gcore -I/Users/schwehr/src/gdal/gdal/alg -I/Users/schwehr/src/gdal/gdal/ogr -I/Users/schwehr/src/gdal/gdal/ogr/ogrsf_frmts -g -O2 -Wall -DHAVE_SSE_AT_COMPILE_TIME -DHAVE_AVX_AT_COMPILE_TIME -DOGR_ENABLED -I/sw/include -I/Users/schwehr/src/gdal/gdal/port -I/sw/include -I/sw -I/sw/include -DGDAL_COMPILATION -c gdalwarpkernel.cpp -fno-common -DPIC -o .libs/gdalwarpkernel.o gdalwarpkernel.cpp:1094:19: error: unused function 'GWKRoundValueT' [-Werror,-Wunused-function] template<> double GWKRoundValueT<double>(double dfValue) ^ gdalwarpkernel.cpp:1114:19: error: unused function 'GWKClampValueT' [-Werror,-Wunused-function] template<> double GWKClampValueT<double>(double dfValue) ^ 2 errors generated.
Proposed change:
-
alg/gdalwarpkernel.cpp
1091 1091 (T)(dfValue + 0.5); 1092 1092 } 1093 1093 1094 template<> double GWKRoundValueT<double>(double dfValue)1095 {1096 return dfValue;1097 }1098 1099 1094 /************************************************************************/ 1100 1095 /* GWKClampValueT() */ 1101 1096 /************************************************************************/ … … 1111 1106 return GWKRoundValueT<T>(dfValue); 1112 1107 } 1113 1108 1114 template<> double GWKClampValueT<double>(double dfValue)1115 {1116 return dfValue;1117 }1118 1119 1109 /************************************************************************/ 1120 1110 /* GWKSetPixelValueRealT() */ 1121 1111 /************************************************************************/
Change History (3)
comment:1 by , 9 years ago
comment:3 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Not currently used, but could potentially be if other templates would specialize double. You can disable them with #ifdef notused.