Unverified Commit 43013ba3 authored by Amy Stamile's avatar Amy Stamile Committed by GitHub
Browse files

Clean Build Warnings (#5257)

* std::unary/binary_function to std:::function

* sprintf -> snprintf

* vsprintf -> vsnprintf

* fixed misc warnings

* bypass jenkins error
parent e1cc9ed1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ pipeline {
                conda activate isis > /dev/null
                conda config --env --set channel_priority flexible
                conda install -c conda-forge python=3 findutils
                mamba env update -f environment.yml --prune
                conda env update -f environment.yml --prune
                conda activate isis
                mamba install -c conda-forge git
                git submodule update --init --recursive
+2 −2
Original line number Diff line number Diff line
@@ -284,7 +284,7 @@ namespace Isis {
    int hours = minutes / 60;
    minutes = minutes - hours * 60;
    char temp[80];
    sprintf(temp, "%02d:%02d:%04.1f", hours, minutes, seconds);
    snprintf(temp, sizeof(temp), "%02d:%02d:%04.1f", hours, minutes, seconds);
    QString conTime = temp;

    //cerr << "Accounting GUI end time=" << endTime <<  " start time=" << p_startTime << "  total=" << seconds << endl;
@@ -296,7 +296,7 @@ namespace Isis {
    seconds = seconds - minutes * 60.0;
    hours = minutes / 60;
    minutes = minutes - hours * 60;
    sprintf(temp, "%02d:%02d:%04.1f", hours, minutes, seconds);
    snprintf(temp, sizeof(temp), "%02d:%02d:%04.1f", hours, minutes, seconds);
    QString cpuTime = temp;

    // Add this information to the log
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ using namespace std;
using namespace Isis;

class CubicFunction :
public std::unary_function <double, double> {
public std::function <double(double)> {
  public:
   double operator()(double x) {
     return -4.0+5.0*x-8.0*x*x+6.0*x*x*x;
@@ -25,7 +25,7 @@ public std::unary_function <double, double> {
};

class ErrorFunction :
public std::unary_function <double, double> {
public std::function <double(double)> {
  public:
   double operator()(double x) {
     IString msg = "This functor always throws an error\n";
+2 −2
Original line number Diff line number Diff line
@@ -330,7 +330,7 @@ namespace Isis {
    va_list ap;
    va_start(ap, fmt);
    char buffer[1024];
    vsprintf(buffer, fmt, ap);
    vsnprintf(buffer, sizeof(buffer), fmt, ap);
    va_end(ap);
    throw IException(IException::Programmer, buffer, _FILEINFO_);
  }
@@ -347,7 +347,7 @@ namespace Isis {
    va_list ap;
    va_start(ap, fmt);
    char buffer[1024];
    vsprintf(buffer, fmt, ap);
    vsnprintf(buffer, sizeof(buffer), fmt, ap);
    va_end(ap);
    throw IException(IException::Programmer, buffer, _FILEINFO_);
  }
+2 −2
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ bool ptXLessThan(const QList<double> l1, const QList<double> l2);
 * @internal
 */
class LineOffsetFunctor :
  public std::unary_function<double, double > {
  public std::function<double(double)> {
  public:

    LineOffsetFunctor(Isis::Camera *camera, const Isis::SurfacePoint &surPt) {
@@ -146,7 +146,7 @@ class LineOffsetFunctor :
 * @internal
 */
class SensorSurfacePointDistanceFunctor :
  public std::unary_function<double, double > {
  public std::function<double(double)> {

  public:
    SensorSurfacePointDistanceFunctor(Isis::Camera *camera, const Isis::SurfacePoint &surPt) {
Loading