Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-442

Running swig generates "Warning(451): Setting a const char * variable may leak memory."

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • proton-0.5
    • None
    • proton-c
    • None

    Description

      When building proton after doing cmake .. the make process is quite "noisy" generating a number of warnings that ought to be corrected.

      One such warning is:
      "Warning(451): Setting a const char * variable may leak memory."

      This relates to the "const char *bytes;" in the pn_delivery_tag_t struct in engine.h

      The swig documentation in http://www.swig.org/Doc1.3/Warnings.html suggests how to suppress this warning (due to the way the code works I believe that it's safe to suppress this case) by doing:

      %warnfilter(451) pn_delivery_tag_t;

      in the various python.i, perl.i etc.

      I've make the changes locally and this indeed works.

      I'll put together a review board request.

      Attachments

        Activity

          People

            Unassigned Unassigned
            fadams Fraser Adams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: