Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3802 closed defect (fixed)

grass77: g.proj compilation fails with proj 5.2.0

Reported by: martinl Owned by: grass-dev@…
Priority: normal Milestone: 7.8.0
Component: Default Version: svn-trunk
Keywords: g.proj Cc:
CPU: Unspecified Platform: Linux

Description

list_codes.c: In function ‘list_codes’:
list_codes.c:109:23: error: format not a string literal and no format arguments [-Werror=format-security]
     sprintf(pathname, init_info.filename);
                       ^~~~~~~~~
list_codes.c:166:20: error: format not a string literal and no format arguments [-Werror=format-security]
      sprintf(name, buf + 2);
                    ^~~
list_codes.c:195:7: error: format not a string literal and no format arguments [-Werror=format-security]
       sprintf(code, buf + bufstart);
       ^~~~~~~
list_codes.c:206:7: error: format not a string literal and no format arguments [-Werror=format-security]
       sprintf(name, buf + bufstart);
       ^~~~~~~
cc1: some warnings being treated as errors

Change History (2)

comment:1 by mmetz, 5 years ago

Resolution: fixed
Status: newclosed

In 74314:

g.proj: use format with sprintf, fixes #3802

comment:2 by martinl, 5 years ago

Great, thanks for quick fix.

Note: See TracTickets for help on using tickets.