Mercurial > octave-antonio
changeset 19784:a3577622952c
avoid some GCC unused parameter warnings
* oct-tex-lexer.in.ll (octave_tex_alloc, octave_tex_realloc,
octave_tex_free): New functions. Disable flex generated versions.
* lex.ll (octave_alloc, octave_realloc, octave_free): New functions.
Disable flex generated versions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 20 Feb 2015 03:53:38 -0500 |
parents | 2dd6d5bdf11d |
children | 299fe39163a2 |
files | libinterp/corefcn/oct-tex-lexer.in.ll libinterp/parse-tree/lex.ll |
diffstat | 2 files changed, 44 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/oct-tex-lexer.in.ll Fri Feb 20 02:36:03 2015 -0500 +++ b/libinterp/corefcn/oct-tex-lexer.in.ll Fri Feb 20 03:53:38 2015 -0500 @@ -25,6 +25,10 @@ %option reentrant %option bison-bridge +%option noyyalloc +%option noyyrealloc +%option noyyfree + %top { #ifdef HAVE_CONFIG_H #include <config.h> @@ -143,6 +147,24 @@ %% +void * +octave_tex_alloc (yy_size_t size, yyscan_t) +{ + return malloc (size); +} + +void * +octave_tex_realloc (void *ptr, yy_size_t size, yyscan_t) +{ + return realloc (ptr, size); +} + +void +octave_tex_free (void *ptr, yyscan_t) +{ + free (ptr); +} + bool text_parser_tex::init_lexer (const std::string& s) {
--- a/libinterp/parse-tree/lex.ll Fri Feb 20 02:36:03 2015 -0500 +++ b/libinterp/parse-tree/lex.ll Fri Feb 20 03:53:38 2015 -0500 @@ -36,6 +36,10 @@ %option reentrant %option bison-bridge +%option noyyalloc +%option noyyrealloc +%option noyyfree + %top { #ifdef HAVE_CONFIG_H #include <config.h> @@ -1713,6 +1717,24 @@ %% +void * +octave_alloc (yy_size_t size, yyscan_t) +{ + return malloc (size); +} + +void * +octave_realloc (void *ptr, yy_size_t size, yyscan_t) +{ + return realloc (ptr, size); +} + +void +octave_free (void *ptr, yyscan_t) +{ + free (ptr); +} + static void display_character (char c) {