Wireshark-commits: [Wireshark-commits] master bd4e293: wiretap: candump: Reset error info and fix s

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 11 Jul 2019 17:44:57 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=bd4e293b7b6f08efe13e24f766d078954e5c66c9
Submitter: "Gerald Combs <gerald@xxxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

bd4e293 by Maksim Salau (maksim.salau@xxxxxxxxx):

    wiretap: candump: Reset error info and fix scanner warnings
    
    candump_open() may be called with non-empty error code and string.
    The error code is not reset upon success in run_candump_parser() which may
    mislead the caller function thus affecting opening the file.
    
    yy_fatal_error(), yy_alloc(), yy_realloc() and yy_free() make no use
    of the yyscanner argument, which results in warnings on OSX.
    In order to get rid of those warning we provide our own
    implementations of memory allocation functions and hack
    YY_EXIT_FAILURE macro in order to pretend using the argument.
    
    Change-Id: I672d374b26970b2699b9d789b6118e97ba660bdf
    Reviewed-on: https://code.wireshark.org/review/33892
    Petri-Dish: Anders Broman <a.broman58@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Gerald Combs <gerald@xxxxxxxxxxxxx>
    

Actions performed:

    from  c9a29e3   Fix Wpointer-sign warnings.
     add  bd4e293   wiretap: candump: Reset error info and fix scanner warnings


Summary of changes:
 wiretap/candump_parser.lemon |  3 +++
 wiretap/candump_scanner.l    | 25 +++++++++++++++++++++++++
 2 files changed, 28 insertions(+)