bugGNU Octave - Bugs: bug #57560, [octave forge] (database) 2.4.4...

 
 

bug #57560: [octave forge] (database) 2.4.4 package install warnings/errors

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Wed 08 Jan 2020 06:48:56 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  Nicholas Jankowski Open/Closed:  * Open
Release:  * 5.1.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 23 Jan 2020 08:56:04 PM UTC, comment #1: 

Yeah, this will still be a problem in Octave 6, on Windows only.

The best catchall solution for this is to cast octave_idx_type variables to a int64_t and use PRId64 or PRIi64 as the printf-format string.

For example


error ("%s: could not save variable %" PRId64, fname.c_str (), static_cast<int64_t> (i + 1));


Mike Miller <mtmiller>
Group Member
Wed 08 Jan 2020 06:48:56 PM UTC, original submission:  

running a >> pkg update in Octave 5.1.0 on Windows 10, produced the following output for database-2.4.4.tar.gz:


command.cc: In member function 'octave_value command::copy_in_handler(const string&, const Cell&, const Cell&, bool, bool)':
command.cc:828:38: warning: format '%li' expects argument of type 'long int', but argument 2 has type 'octave_idx_type {aka long long int}' [-Wformat=]
                                  i, j);
                                      ^
command.cc:828:38: warning: format '%li' expects argument of type 'long int', but argument 3 has type 'octave_idx_type {aka long long int}' [-Wformat=]
var2bytea.cc: In function 'octave_value_list Fvar2bytea(const octave_value_list&, int)':
var2bytea.cc:101:74: warning: format '%li' expects argument of type 'long int', but argument 3 has type 'octave_idx_type {aka long long int}' [-Wformat=]
           error ("%s: could not save variable %li", fname.c_str (), i + 1);
                                                                     ~~~~~^
In file included from bytea2var.cc:28:0:
bytea2var.cc: In function 'octave_value_list Fbytea2var(const octave_value_list&, int)':
error-helpers.h:50:31: warning: format '%li' expects argument of type 'long int', but argument 3 has type 'octave_idx_type {aka long long int}' [-Wformat=]
             error (__VA_ARGS__); \
                               ^
bytea2var.cc:58:7: note: in expansion of macro 'CHECK_ERROR'
       CHECK_ERROR (m = args(i).uint8_array_value (), retval,
       ^~~~~~~~~~~
bytea2var.cc:139:68: warning: format '%li' expects argument of type 'long int', but argument 3 has type 'octave_idx_type {aka long long int}' [-Wformat=]
     error ("%s: could not load variable %li", fname.c_str (), i + 1);
                                                               ~~~~~^
For information about changes from previous versions of the database package, run 'news database'.


the package appeared to complete installation, but errors/warnings are a concern. Unknown if it would still occur in upcoming v6.0

Nicholas Jankowski <nrjank>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-23 mtmiller StatusNone Confirmed

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code