# HG changeset patch # User Rik # Date 1378402449 25200 # Node ID 15e2ad6372f75c9d74278cd09ddd64ec1deff9f2 # Parent f0e3d3de5c2202829c86c4675975ca7de4f2a199 maint: Tweaks to remove compiler warnings. * libgui/src/find-files-model.cc(rowCount, columnCount): Eliminate unused input parameter p. * libinterp/corefcn/octave-link.cc(F__octave_link_file_dialog__): Use signed int in for loop index for comparison to octave_idx_type. * libinterp/corefcn/txt-eng-ft.cc(ft_render::visit): Initialize all of mbstate_t structure (not just first field) with memset() to 0. * libinterp/parse-tree/oct-parse.in.yy(F__parse_file__): Remove unused nargout parameter. diff --git a/libgui/src/find-files-model.cc b/libgui/src/find-files-model.cc --- a/libgui/src/find-files-model.cc +++ b/libgui/src/find-files-model.cc @@ -111,13 +111,13 @@ } int -find_files_model::rowCount (const QModelIndex & p) const +find_files_model::rowCount (const QModelIndex &) const { return _files.size(); } int -find_files_model::columnCount (const QModelIndex & p) const +find_files_model::columnCount (const QModelIndex &) const { return _columnNames.size (); } diff --git a/libinterp/corefcn/octave-link.cc b/libinterp/corefcn/octave-link.cc --- a/libinterp/corefcn/octave-link.cc +++ b/libinterp/corefcn/octave-link.cc @@ -255,7 +255,7 @@ std::list::iterator it = items_lst.begin (); - for (unsigned int idx = 0; idx < nel; idx++) + for (int idx = 0; idx < nel; idx++) { items.xelem (idx) = *it; it++; diff --git a/libinterp/corefcn/txt-eng-ft.cc b/libinterp/corefcn/txt-eng-ft.cc --- a/libinterp/corefcn/txt-eng-ft.cc +++ b/libinterp/corefcn/txt-eng-ft.cc @@ -42,8 +42,8 @@ #include "pr-output.h" #include "txt-eng-ft.h" -// FIXME -- maybe issue at most one warning per glyph/font/size/weight -// combination. +// FIXME: maybe issue at most one warning per glyph/font/size/weight +// combination. static void gripe_missing_glyph (FT_ULong c) @@ -62,10 +62,10 @@ } #ifdef _MSC_VER -// This is just a trick to avoid multiply symbols definition. +// This is just a trick to avoid multiple symbol definitions. // PermMatrix.h contains a dllexport'ed Array -// that will make MSVC not to generate new instantiation and -// use the imported one. +// that will cause MSVC not to generate a new instantiation and +// use the imported one instead. #include "PermMatrix.h" #endif @@ -154,8 +154,7 @@ FT_Done_FreeType (library); #if defined (HAVE_FONTCONFIG) - // FIXME -- Skip the call to FcFini because it can trigger the - // assertion + // FIXME: Skip the call to FcFini because it can trigger the assertion // // octave: fccache.c:507: FcCacheFini: Assertion 'fcCacheChains[i] == ((void *)0)' failed. // @@ -225,7 +224,7 @@ FcDefaultSubstitute (pat); match = FcFontMatch (0, pat, &res); - // FIXME -- originally, this test also required that + // FIXME: originally, this test also required that // res != FcResultNoMatch. Is that really needed? if (match) { @@ -284,8 +283,7 @@ { if (face->generic.data) { - ft_key* pkey = - reinterpret_cast (face->generic.data); + ft_key* pkey = reinterpret_cast (face->generic.data); cache.erase (*pkey); delete pkey; @@ -634,7 +632,8 @@ std::string str = e.string_value (); size_t n = str.length (), curr = 0; - mbstate_t ps = { 0 }; + mbstate_t ps; + memset (&ps, 0, sizeof (ps)); // Initialize state to 0. wchar_t wc; while (n > 0) diff --git a/libinterp/parse-tree/oct-parse.in.yy b/libinterp/parse-tree/oct-parse.in.yy --- a/libinterp/parse-tree/oct-parse.in.yy +++ b/libinterp/parse-tree/oct-parse.in.yy @@ -4436,7 +4436,7 @@ return retval; } -DEFUN (__parse_file__, args, nargout, +DEFUN (__parse_file__, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __parse_file__ (@var{file}, @var{verbose})\n\ Undocumented internal function.\n\