aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lemon
AgeCommit message (Collapse)AuthorFilesLines
2019-12-26Lemon: Squelch an unused parameter warning.Gerald Combs1-1/+3
Fixes ... tools\lemon\lemon.c(1630,14): warning C4100: 'argc': unreferenced formal parameter ... Change-Id: I5cddbbed025e246ddebe9189edbe6fbeea883a7d Reviewed-on: https://code.wireshark.org/review/35522 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2018-10-21Test C compiler flags with check_c_compiler_flag(), not check_c_linker_flag().Guy Harris1-1/+1
Change-Id: If56a6acf9935838232d6ee86e331361fb076369b Reviewed-on: https://code.wireshark.org/review/30316 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-21lemon: fix GCC/Clang warnings pre CMake 3.11, silence VSCA warningsPeter Wu1-7/+18
The COMPILE_OPTIONS source file property was introduced with CMake 3.11, disable warnings via a target property instead (available since 2.8.12). Disable some VS Code Analysis warnings. These flags seem to be accepted since VS2015, so they can be added unconditionally. Change-Id: Idfbf154caf8c1168f1f871a640a25b816a2cfab8 Fixes: v2.9.0rc0-2274-g7ce9081fdc ("lemon: sync with upstream (2018-09-08)") Reviewed-on: https://code.wireshark.org/review/30298 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-21lemon: sync with upstream (2018-09-08)Peter Wu14-1518/+913
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@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-21lemon: fix memleak in ReportTablePeter Wu1-3/+1
Building without -DENABLE_ASAN=1 but with -fsanitize=address (as is done by oss-fuzz) still triggers a memleak report. Closer inspection revealed that two other members were leaked. Change-Id: I3d022ac50c554891a73b9380b7879c1a60c3c798 Reviewed-on: https://code.wireshark.org/review/30289 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-07lemon: Make it build with __clang_analyzer__ definedStig Bjørlykke1-3/+3
The static function handleswitch() is not compiled with __clang_analyzer__ defined, but it's used in OptInit() without any checks. Change to have an empty implementation for __clang_analyzer__. Change-Id: I73da2042ec64fdfa6910c02c059d36db491dc538 Reviewed-on: https://code.wireshark.org/review/28059 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18Remove autotools build system.Dario Lombardo1-46/+0
It has been replaced by cmake. Change-Id: I83a5eddb8645dbbf6bca9f026066d2e995d8e87a Reviewed-on: https://code.wireshark.org/review/26969 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05lemon: remove leaks in main().Dario Lombardo1-2/+20
Change-Id: If6693d2ad87fcd1dcceb137d76d890663f83a827 Reviewed-on: https://code.wireshark.org/review/26705 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05lemon: remove leak in tplt_open().Dario Lombardo1-0/+8
Change-Id: I6a13c89e27797f8c8d1e187aef8923b9df0c8ee4 Reviewed-on: https://code.wireshark.org/review/26706 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05lemon: remove scan-build warning in errline().Dario Lombardo1-3/+5
Warning: Argument with 'nonnull' attribute passed null. Change-Id: Ie46733ae8663161b957acaabbaa2da539018693d Reviewed-on: https://code.wireshark.org/review/26704 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-04lemon: make some functions static.Dario Lombardo1-2/+2
Change-Id: I41a78d6cb87223d13854ca4aad4ffdf70daecaf3 Reviewed-on: https://code.wireshark.org/review/26687 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-04lemon: comment out unused OptErr function.Dario Lombardo1-0/+4
Change-Id: I889c2f0df721d93752c77e6b31ddaa8702ab47bf Reviewed-on: https://code.wireshark.org/review/26703 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-30lemon: skip clang analyzer for more code.Dario Lombardo1-1/+1
Change-Id: I3c2c0e1581c759fb4eef48008a7d905701958913 Reviewed-on: https://code.wireshark.org/review/26688 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-30lemon: remove unneeded assignment.Dario Lombardo1-1/+0
Change-Id: Id7bd4b5f7db1c9c797a2f50e7896799a0ad64532 Reviewed-on: https://code.wireshark.org/review/26690 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-30lemon: remove clang scan warnings.Dario Lombardo1-0/+18
Add assert and remove some code from scan builds. Change-Id: I32747d1a61f183e4c918d9f50ec8337eaef47f0d Reviewed-on: https://code.wireshark.org/review/26483 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-28lemon: Sync with latest trunk.Anders2-175/+319
Change-Id: Iab0d64f675b482eee97b300d419ffa1e8090632e Reviewed-on: https://code.wireshark.org/review/26676 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-28lemon: Sync with upstream, Jun 28, 2017Anders2-26/+39
Change-Id: I4c6dbd018302fdf176e955e0e5e735a7aee22b10 Reviewed-on: https://code.wireshark.org/review/26669 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-28lemon: Align struct s_options with upstream.Anders1-60/+57
Change-Id: I87ce8123a625a643a7c3d9e426f5ce103a670f2a Reviewed-on: https://code.wireshark.org/review/26666 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-27lemon: Trivial changes to make it easier to compare with upstream.Anders1-19/+41
Change-Id: I1bfac3d39a50b3d2093c66a77280b355e678d427 Reviewed-on: https://code.wireshark.org/review/26664 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07spdx: more licenses converted.Dario Lombardo1-13/+1
Change-Id: I3861061ec261e63b23621799e020e811ed78a343 Reviewed-on: https://code.wireshark.org/review/26333 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-17Don't have CLEAN_FILES variables for the "clean" source files.Guy Harris1-5/+1
Except for the one directory that (currently) has "not yet clean" files, epan/dissectors, we don't need a separate variable to keep track of the "clean" source files. In the cases where not all files were in CLEAN_FILES, put them into the variable used to enable -Werror or its equivalent. Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b Reviewed-on: https://code.wireshark.org/review/25830 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-11-18autotools: Library build products don't need explicit cleaningJoão Valverde1-3/+0
Change-Id: I5d68c05f2844d6c9ae486531b189dbf10bc09cff Reviewed-on: https://code.wireshark.org/review/24484 Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15autotools: make maintainer-clean should allow rerunning 'configure'João Valverde1-3/+0
Change-Id: Iedae94ffefe27b13b1967d69cacb757b5aa4576d Reviewed-on: https://code.wireshark.org/review/23928 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15Remove superfluous null-checks before strdup/freeAhmad Fatoum1-4/+3
NULL checks were removed for following free functions: - g_free "If mem is NULL it simply returns" https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free - g_slist_free(_full)? "NULL is considered to be the empty list" https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html - g_strfreev "If str_array is NULL, this function simply returns." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev - g_slice_free "If mem is NULL, this macro does nothing." https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free - g_match_info_free "not NULL... otherwise does nothing" https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free - dfilter_free defined in Wireshark code. Returns early when passed NULL epan/dfilter/dfilter.c They were also removed around calls to g_strdup where applicable: - g_strdup "If str is NULL it returns NULL." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04 Reviewed-on: https://code.wireshark.org/review/23406 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-13CMake: Allow user build flags to override default build flagsJoão Valverde1-3/+5
Autotools has the very useful feature by design of allowing the user to override the default build flags (you break it you keep it). Apparently CMake applies COMPILE_OPTIONS target property after CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those variables instead to make it work then. Specific target flag overrides can still be added with COMPILER_OPTIONS (e.g: generated files with -Wno-warning) but this is less effective and then we're back at the point where this overrides user flags. It's less of a concern though. Change-Id: I44761a79be4289238e02d4e781fef0099628817b Reviewed-on: https://code.wireshark.org/review/23675 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-09-06plugins: config.h must not be included by public headersJoão Valverde1-0/+2
For a sane plugin build environment. Include config.h as the first header in the .c file instead. Fix by moving required compiler attribute macros to a new "ws_attributes.h" API header. Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1 Reviewed-on: https://code.wireshark.org/review/23400 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-05-31lemon: avoid redundant redeclaration of ‘memory_error’ [-Wredundant-decls]Alexis La Goutte1-6/+2
Change-Id: I1fbc11dc433363b659ddba9a77e52ffd4e3968d7 Reviewed-on: https://code.wireshark.org/review/21850 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-05lempar: set ParseInit/ParseFinalize staticAlexis La Goutte1-2/+2
grammar.c:471:6: warning: no previous prototype for ‘DfilterInit’ [-Wmissing-prototypes] grammar.c:646:6: warning: no previous prototype for ‘DfilterFinalize’ [-Wmissing-prototypes] dtd_grammar.c:502:6: warning: no previous prototype for ‘DtdParseInit’ [-Wmissing-prototypes] dtd_grammar.c:637:6: warning: no previous prototype for ‘DtdParseFinalize’ [-Wmissing-prototypes] Change-Id: I9c43fb4d5ad50992e8e55163333793b20319aa74 Reviewed-on: https://code.wireshark.org/review/21516 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-02lemon: fix no previous prototype for ‘memory_error’ [-Wmissing-prototypes]Alexis La Goutte1-1/+1
Change-Id: I5830581c843af41f48bc9645c2be7cf35fa00391 Reviewed-on: https://code.wireshark.org/review/21463 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-24Revert "Make the set of static routines match that in the current tip SQLite."Alexis La Goutte1-15/+17
This reverts commit 96c72df2dfe9c84bc2716352ebe1876ddd8ceaf4. Generated a lot of warning (-Wmissing-prototypes) and i try to kept a sync branch on https://github.com/alagoutte/sqlite/tree/wireshark Change-Id: I42252a6e736f96783a9fa9805b84e525fe11726e Reviewed-on: https://code.wireshark.org/review/21182 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-04-15Update to the current lempar.c in the SQLite repository.Guy Harris1-27/+44
Change-Id: I86ca187a7c698541d70bab558c4073fdff28dea3 Reviewed-on: https://code.wireshark.org/review/21108 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-15Make the set of static routines match that in the current tip SQLite.Guy Harris1-17/+15
This reduces the differences between our lemon.c and SQLite's. Change-Id: Ie672fa564a43ffe2fae271968accfed2a864bb63 Reviewed-on: https://code.wireshark.org/review/21107 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-15Make memory_error() a routine.Guy Harris1-2/+10
That makes the code more like Lemon as distributed. Note that Lemon, as distributed, at least claims to have a bunch of stuff "From the file "XXX.{c,h}", which might be the result of lemon.c being an "amalgamation": https://www.sqlite.org/amalgamation.html although, unlike SQLite, the individual bits of the amalgamation don't appear to be present in the SQLite Fossil repository, so maybe they've been permanently glued together. Change-Id: I361d0d16be0744b127110d7d237fdd84e30b6432 Reviewed-on: https://code.wireshark.org/review/21105 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-15Make whitespace match what's checked into the SQLite repository.Guy Harris1-6/+6
They accepted some of our changes, but with no space between "struct XXX" and "*. Whatever. Change-Id: I6b29462dc8b04ebf0822f8512d82f5f8df575447 Reviewed-on: https://code.wireshark.org/review/21101 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-05lemon: fix this statement may fall through [-Werror=implicit-fallthrough=] ↵Alexis La Goutte1-1/+1
found by gcc7 Change-Id: If52bc0092f1baa833e35a9f4c107faf72c3b64d1 Reviewed-on: https://code.wireshark.org/review/20392 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-30lemon: Fix Dereference of null pointer found by Clang analyzerAlexis La Goutte1-1/+1
lemon.c:877:10: warning: Access to field 'lhs' results in a dereference of a null pointer (loaded from field 'startRule') lemon.c:1141:22: warning: Access to field 'lhs' results in a dereference of a null pointer (loaded from field 'startRule') it is false positve lem.nrule==0 implies lem.rule==NULL Change-Id: Id63086990762fbf5195bce34a28f25aeb7a246f7 Reviewed-on: https://code.wireshark.org/review/19445 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-24Lemon: resync with upstreamAlexis La Goutte2-209/+495
lemon: Tue Aug 16 16:46:40 2016 lempar: Tue Dec 6 17:59:05 2016 +0000 a copy of all Wireshark changes are available https://github.com/alagoutte/sqlite/tree/wireshark Change-Id: I144d0f983e4ac960b5a7a2fd8cd379f6282579f8 Reviewed-on: https://code.wireshark.org/review/15987 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-07Disable ASAN when building lemon.Gerald Combs2-4/+5
If ASAN is enabled, use "-fno-sanitize=all" when building lemon. This keeps us from having to set ASAN_OPTIONS=detect_leaks=0 in the environment in order to build Wireshark. Change-Id: I36f6d1a4f913ecabaf188f4c2b59216c8430d81a Reviewed-on: https://code.wireshark.org/review/18098 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-09-30cmake: make WERROR_COMMON_FLAGS a normal stringPeter Wu1-7/+18
Instead of checking for the boolean "FALSE", just set an empty string. This avoids the need to check for WERROR_COMMON_FLAGS before using it. The transformation is the same for all files, remove "if (WERROR_COMMON_FLAGS)" and "endif()", reindent and add quotes (since we have a string here and not a list). Modelines have been added where missing. Change-Id: I0ab05ae507c51fa77336d49a99a226399cc81b92 Reviewed-on: https://code.wireshark.org/review/17997 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com>
2016-08-23CMake: Allow setting per target compiler warningsJoão Valverde1-0/+1
Setting our compiler warning flags in CMAKE_C_FLAGS does not allow using different flags per target. Allow for that possibility by setting the internal WS_WARNINGS_{C,CXX}_FLAGS and using the COMPILE_OPTIONS property to set them. This change is just setting mechanism and there should be no difference in generated warnings. The check_X_compiler_flag cmake test is changed to test each flag individually. We need a list, not a space separated string, and the aggregate test is not significant. Change-Id: I59fc5cd7e130c7a5e001c598e3df3e13f83a6a25 Reviewed-on: https://code.wireshark.org/review/17150 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-06-16lemon: use a define for fseek()'s whence parameterMartin Kaiser1-1/+1
for people who don't immediately understand what fseek(fp, 0, 2) does Change-Id: I297ba6fd718ef0f09c4d0b29bf433262c3c38435 Reviewed-on: https://code.wireshark.org/review/15976 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-15Remove Nmake build systemPascal Quantin2-20/+0
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61 Reviewed-on: https://code.wireshark.org/review/15777 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-12Have MemoryCheck() directly incorporate the error message and exit.Guy Harris1-13/+3
Manually inline memory_error() in MemoryCheck(), so that static analyzers know that, if MemoryCheck() sees a null pointer, it exists, and the null pointer isn't subsequently used. Use MemoryCheck() instead of the one place where we manually checked for a null pointer and called memory_error(). Change-Id: Id6b0328cfd17cb14ec9d1e461420896a31573c71 Reviewed-on: https://code.wireshark.org/review/15851 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-12Add more memory checks, and use MemoryCheck() for some existing checks.Guy Harris1-31/+14
Always check for malloc() and realloc() failing. Use MemoryCheck() for most of the checks - it's a bit cleaner and makes the error message the same for those checks. Change-Id: I533153c697b37b85adfa0259c1352efece0b0486 Reviewed-on: https://code.wireshark.org/review/15849 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-08Minor lemon Makefile.am fixupJoão Valverde1-1/+2
Change-Id: I80108d565e40835e9bf3fa58b1999735a45d77f0 Reviewed-on: https://code.wireshark.org/review/14860 Reviewed-by: João Valverde <j@v6e.pt>
2016-04-07Don't build lemon using -WerrorJoão Valverde1-1/+1
Change-Id: I0b7d691616578e8d5897b60fc31a469c9ab81607 Reviewed-on: https://code.wireshark.org/review/14850 Reviewed-by: João Valverde <j@v6e.pt>
2016-04-07autotools: Use AC_SUBST to set -Werror flagJoão Valverde1-5/+1
Change-Id: I34a90155ab613ca97bf58b72f56ec08eff87d3ab Reviewed-on: https://code.wireshark.org/review/14849 Reviewed-by: João Valverde <j@v6e.pt>
2016-04-05Fix VPATH buildJoão Valverde1-1/+1
Fixup for ecb4dc396ef71feb67aeda7603e09b0cea0bc920. Change-Id: I3230e0ca203deb15dde8f22806307d59d70e05dd Reviewed-on: https://code.wireshark.org/review/14812 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-10Use AX_PROG_CC_FOR_BUILD macro to identify compiler targeting the build host.Eric Anderson1-12/+8
(When cross-compiling, this is *not* the compiler used to build wireshark itself). Macro ax_prog_cc_for_build.m4 retrieved from http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git Change-Id: I035059d9315e0081dcf1ffbafd9ce6d7ad46700c Reviewed-on: https://code.wireshark.org/review/4503 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Eric Anderson <andersoe@cs.cmu.edu> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-03lemon: Use automake rulesJoão Valverde1-4/+14
Change-Id: I5110e3781682e003cc4e60a592694dc9e8930456 Reviewed-on: https://code.wireshark.org/review/13641 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>