Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-1401

Compiler warning about memset in meas_modelfit

    Details

    • Templates:
    • Team:
      Data Release Production

      Description

      I see the following warnings when building meas_modelfit on MacOS 10.9 with clang 6:

      python/lsst/meas/modelfit/modelfitLib_wrap.cc:4703:9: warning: destination for this 'memset' call is a pointer to dynamic class 'lsst::afw::geom::ellipses::Ellipse'; vtable pointer will be
            overwritten [-Wdynamic-class-memaccess]
              memset(v_def,0,sizeof(Type));
              ~~~~~~ ^
      python/lsst/meas/modelfit/modelfitLib_wrap.cc:4728:62: note: in instantiation of member function 'swig::traits_as<lsst::afw::geom::ellipses::Ellipse, swig::pointer_category>::as' requested
            here
          return traits_as<Type, typename traits<Type>::category>::as(obj, te);
                                                                   ^
      python/lsst/meas/modelfit/modelfitLib_wrap.cc:5285:15: note: in instantiation of function template specialization 'swig::as<lsst::afw::geom::ellipses::Ellipse>' requested here
              return swig::as<T>(item, true);
                           ^
      python/lsst/meas/modelfit/modelfitLib_wrap.cc:5520:42: note: in instantiation of member function 'swig::SwigPySequence_Ref<lsst::afw::geom::ellipses::Ellipse>::operator Ellipse' requested
            here
            seq->insert(seq->end(),(value_type)(*it));
                                               ^
      python/lsst/meas/modelfit/modelfitLib_wrap.cc:5542:6: note: in instantiation of function template specialization 'swig::assign<swig::SwigPySequence_Cont<lsst::afw::geom::ellipses::Ellipse>,
            std::__1::vector<lsst::afw::geom::ellipses::Ellipse, std::__1::allocator<lsst::afw::geom::ellipses::Ellipse> > >' requested here
                  assign(swigpyseq, pseq);
                  ^
      python/lsst/meas/modelfit/modelfitLib_wrap.cc:5597:47: note: in instantiation of member function 'swig::traits_asptr_stdseq<std::__1::vector<lsst::afw::geom::ellipses::Ellipse,
            std::__1::allocator<lsst::afw::geom::ellipses::Ellipse> >, lsst::afw::geom::ellipses::Ellipse>::asptr' requested here
              return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
                                                           ^
      python/lsst/meas/modelfit/modelfitLib_wrap.cc:4620:32: note: in instantiation of member function 'swig::traits_asptr<std::__1::vector<lsst::afw::geom::ellipses::Ellipse,
            std::__1::allocator<lsst::afw::geom::ellipses::Ellipse> > >::asptr' requested here
          return traits_asptr<Type>::asptr(obj, vptr);
                                     ^
      python/lsst/meas/modelfit/modelfitLib_wrap.cc:34938:18: note: in instantiation of function template specialization 'swig::asptr<std::__1::vector<lsst::afw::geom::ellipses::Ellipse,
            std::__1::allocator<lsst::afw::geom::ellipses::Ellipse> > >' requested here
          res4 = swig::asptr(obj3, &ptr);
                       ^
      python/lsst/meas/modelfit/modelfitLib_wrap.cc:4703:9: note: explicitly cast the pointer to silence this warning
              memset(v_def,0,sizeof(Type));
                     ^
                     (void*)
      10 warnings generated.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbosch Jim Bosch
                Reporter:
                rowen Russell Owen
                Watchers:
                Jim Bosch, John Swinbank, Russell Owen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel