Wireshark-commits: [Wireshark-commits] master 7ce9081: lemon: sync with upstream (2018-09-08)
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 21 Oct 2018 07:00:11 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=7ce9081fdcf48085611d2de6db0964dffd9ae700
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

7ce9081 by Peter Wu (peter@xxxxxxxxxxxxx):

    lemon: sync with upstream (2018-09-08)
    
    Changes:
    - Drop the old basename modification that was present in the Wireshark
      version of lemon.c. Use a new option available since 2018-04-20
      ("Add the -dDIRECTORY command-line option to LEMON.")
    - Redo the static analyzer warning fixes, identifying the root causes
      and adding assertions instead of hiding code with __clang_analyzer__.
    - Ignore compiler warnings instead of adding config.h, _U_, extra const
      keywords, unsigned/signed changes, etc.
    - Remove lemon.html, it is out-of-date and external links are available.
    
    In order to make future updates easier, document the exact steps that
    were followed to create the lemon.c and lempar.c files. Future changes
    SHOULD follow the same process.
    
    My process to reach this updated lemon version:
    1. Identify previous sync. Found v2.5.2rc0-147-g653af0f6d0 ("lemon: Sync
       with latest trunk.") which seems based on sqlite commit 2b3d584ffe.
    2. Check successive Wireshark patches. Identified many non-functional
       changes to silence compiler warnings and static analyzer issues.
       Found one feature (basename) that can be replaced with upstream -d.
    3. Write minimal patches and document changes.
    
    Upstream typos and coding style issues (other than trailing whitespace)
    were deliberately not fixed to remain as close as possible to upstream.
    
    Change-Id: I606f46dede86e34520f962a9e7163912392aad57
    Reviewed-on: https://code.wireshark.org/review/30290
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  bb2caa2   lemon: fix memleak in ReportTable
     add  7ce9081   lemon: sync with upstream (2018-09-08)


Summary of changes:
 cmake/modules/UseLemon.cmake                       |   3 +-
 tools/lemon/CMakeLists.txt                         |  63 +-
 tools/lemon/README                                 |  47 +-
 tools/lemon/apply-patches.sh                       |  14 +
 tools/lemon/lemon.c                                | 871 ++++++++++----------
 tools/lemon/lemon.html                             | 894 ---------------------
 tools/lemon/lempar.c                               | 343 ++++----
 .../patches/01-lempar-wireshark-warnings.patch     |  48 ++
 tools/lemon/patches/02-lemon-fix-dead-store.patch  |  12 +
 tools/lemon/patches/03-lemon-null-deref-fp.patch   |  33 +
 .../patches/04-lemon-struct-copy-memleak-fp.patch  |  44 +
 .../patches/05-lemon-memleak-alloc-failure.patch   |  11 +
 .../06-lemon-memleak-template-assumption.patch     |  17 +
 .../patches/07-lemon-fix-reporttable-memleak.patch |  17 +
 tools/lemon/patches/08-lemon-stp-memleak-fp.patch  |  17 +
 15 files changed, 915 insertions(+), 1519 deletions(-)
 create mode 100755 tools/lemon/apply-patches.sh
 delete mode 100644 tools/lemon/lemon.html
 create mode 100644 tools/lemon/patches/01-lempar-wireshark-warnings.patch
 create mode 100644 tools/lemon/patches/02-lemon-fix-dead-store.patch
 create mode 100644 tools/lemon/patches/03-lemon-null-deref-fp.patch
 create mode 100644 tools/lemon/patches/04-lemon-struct-copy-memleak-fp.patch
 create mode 100644 tools/lemon/patches/05-lemon-memleak-alloc-failure.patch
 create mode 100644 tools/lemon/patches/06-lemon-memleak-template-assumption.patch
 create mode 100644 tools/lemon/patches/07-lemon-fix-reporttable-memleak.patch
 create mode 100644 tools/lemon/patches/08-lemon-stp-memleak-fp.patch