Page MenuHome GnuPG

gnupg isn't LTO ready
Closed, WontfixPublic

Description

It emits several warnings about types mismatch

In below compile warnings most important are [-Wlto-type-mismatch] however it would be good to clean the code to calm down all other warnings as well

dotlock.c: In function 'use_hardlinks_p':
dotlock.c:624:10: warning: ignoring return value of 'link', declared with attribute warn_unused_result [-Wunused-result]
  624 |   (void) link (tname, lname);
      |          ^~~~~~~~~~~~~~~~~~~
dotlock.c: In function 'dotlock_take_unix':
dotlock.c:1071:14: warning: ignoring return value of 'link', declared with attribute warn_unused_result [-Wunused-result]
 1071 |       (void) link (h->tname, h->lockname);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c: In function 'got_fatal_signal':
signal.c:111:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  111 |   (void)write (2, "\n", 1 );
      |         ^~~~~~~~~~~~~~~~~~~
signal.c:114:11: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  114 |     (void)write(2, s, strlen (s));
      |           ^~~~~~~~~~~~~~~~~~~~~~~
signal.c:115:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  115 |   (void)write (2, ": signal ", 9 );
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:118:12: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  118 |     (void) write (2, s, strlen(s) );
      |            ^~~~~~~~~~~~~~~~~~~~~~~~
signal.c:128:15: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  128 |         (void)write (2, "?", 1);
      |               ^~~~~~~~~~~~~~~~~
signal.c:137:25: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  137 |                   (void)write (2, &"0123456789"[value/i], 1);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:145:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  145 |   (void)write (2, " caught ... exiting\n", 20);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dotlock.c: In function 'use_hardlinks_p':
dotlock.c:624:10: warning: ignoring return value of 'link', declared with attribute warn_unused_result [-Wunused-result]
  624 |   (void) link (tname, lname);
      |          ^~~~~~~~~~~~~~~~~~~
dotlock.c: In function 'dotlock_take_unix':
dotlock.c:1071:14: warning: ignoring return value of 'link', declared with attribute warn_unused_result [-Wunused-result]
 1071 |       (void) link (h->tname, h->lockname);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c: In function 'got_fatal_signal':
signal.c:111:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  111 |   (void)write (2, "\n", 1 );
      |         ^~~~~~~~~~~~~~~~~~~
signal.c:114:11: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  114 |     (void)write(2, s, strlen (s));
      |           ^~~~~~~~~~~~~~~~~~~~~~~
signal.c:115:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  115 |   (void)write (2, ": signal ", 9 );
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:118:12: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  118 |     (void) write (2, s, strlen(s) );
      |            ^~~~~~~~~~~~~~~~~~~~~~~~
signal.c:128:15: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  128 |         (void)write (2, "?", 1);
      |               ^~~~~~~~~~~~~~~~~
signal.c:137:25: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  137 |                   (void)write (2, &"0123456789"[value/i], 1);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:145:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  145 |   (void)write (2, " caught ... exiting\n", 20);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t-exechelp.c: In function 'test_close_all_fds':
t-exechelp.c:96:3: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
   96 |   dup (1);
      |   ^~~~~~~
t-exechelp.c:97:3: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
   97 |   dup (1);
      |   ^~~~~~~
t-exechelp.c:99:3: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
   99 |   dup (1);
      |   ^~~~~~~
t-exechelp.c:140:9: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
  140 |         dup (1);
      |         ^~~~~~~
t-exechelp.c:147:11: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
  147 |           dup (1);
      |           ^~~~~~~
photoid.h:31:6: warning: type of 'show_photos' does not match original declaration [-Wlto-type-mismatch]
   31 | void show_photos (ctrl_t ctrl, const struct user_attribute *attrs, int count,
      |      ^
test-stubs.c:355:1: note: type mismatch in parameter 2
  355 | show_photos (const struct user_attribute *attrs, int count, PKT_public_key *pk)
      | ^
test-stubs.c:355:1: note: 'show_photos' was previously declared here
keyserver-internal.h:31:24: warning: type of 'parse_keyserver_uri' does not match original declaration [-Wlto-type-mismatch]
   31 | struct keyserver_spec *parse_keyserver_uri (const char *string,
      |                        ^
test-stubs.c:337:1: note: type mismatch in parameter 3
  337 | parse_keyserver_uri (const char *uri, int require_scheme,
      | ^
test-stubs.c:337:1: note: 'parse_keyserver_uri' was previously declared here
keyserver-internal.h:53:5: warning: type of 'keyserver_import_ldap' does not match original declaration [-Wlto-type-mismatch]
   53 | int keyserver_import_ldap (ctrl_t ctrl, const char *name,
      |     ^
test-stubs.c:237:1: note: type mismatch in parameter 2
  237 | keyserver_import_ldap (const char *name)
      | ^
test-stubs.c:237:1: note: 'keyserver_import_ldap' was previously declared here
keyserver-internal.h:50:5: warning: type of 'keyserver_import_name' does not match original declaration [-Wlto-type-mismatch]
   50 | int keyserver_import_name (ctrl_t ctrl,
      |     ^
test-stubs.c:229:1: note: type mismatch in parameter 3
  229 | keyserver_import_name (const char *name,struct keyserver_spec *spec)
      | ^
test-stubs.c:229:1: note: 'keyserver_import_name' was previously declared here
keyserver-internal.h:46:13: warning: type of 'keyserver_import_pka' does not match original declaration [-Wlto-type-mismatch]
   46 | gpg_error_t keyserver_import_pka (ctrl_t ctrl, const char *name,
      |             ^
test-stubs.c:209:1: note: return value type mismatch
  209 | keyserver_import_pka (const char *name,unsigned char *fpr)
      | ^
test-stubs.c:209:1: note: type 'int' should match type 'gpg_error_t'
test-stubs.c:209:1: note: 'keyserver_import_pka' was previously declared here
keyserver-internal.h:44:5: warning: type of 'keyserver_import_cert' does not match original declaration [-Wlto-type-mismatch]
   44 | int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
      |     ^
test-stubs.c:202:1: note: type mismatch in parameter 2
  202 | keyserver_import_cert (const char *name)
      | ^
test-stubs.c:202:1: note: 'keyserver_import_cert' was previously declared here
keyserver-internal.h:39:5: warning: type of 'keyserver_import_keyid' does not match original declaration [-Wlto-type-mismatch]
   39 | int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
      |     ^
test-stubs.c:181:1: note: type mismatch in parameter 3
  181 | keyserver_import_keyid (u32 *keyid, void *dummy, int quick)
      | ^
test-stubs.c:181:1: note: 'keyserver_import_keyid' was previously declared here
photoid.h:31:6: warning: type of 'show_photos' does not match original declaration [-Wlto-type-mismatch]
   31 | void show_photos (ctrl_t ctrl, const struct user_attribute *attrs, int count,
      |      ^
test-stubs.c:355:1: note: type mismatch in parameter 2
  355 | show_photos (const struct user_attribute *attrs, int count, PKT_public_key *pk)
      | ^
test-stubs.c:355:1: note: 'show_photos' was previously declared here
keyserver-internal.h:31:24: warning: type of 'parse_keyserver_uri' does not match original declaration [-Wlto-type-mismatch]
   31 | struct keyserver_spec *parse_keyserver_uri (const char *string,
      |                        ^
test-stubs.c:337:1: note: type mismatch in parameter 3
  337 | parse_keyserver_uri (const char *uri, int require_scheme,
      | ^
test-stubs.c:337:1: note: 'parse_keyserver_uri' was previously declared here
keyserver-internal.h:53:5: warning: type of 'keyserver_import_ldap' does not match original declaration [-Wlto-type-mismatch]
   53 | int keyserver_import_ldap (ctrl_t ctrl, const char *name,
      |     ^
test-stubs.c:237:1: note: type mismatch in parameter 2
  237 | keyserver_import_ldap (const char *name)
      | ^
test-stubs.c:237:1: note: 'keyserver_import_ldap' was previously declared here
keyserver-internal.h:50:5: warning: type of 'keyserver_import_name' does not match original declaration [-Wlto-type-mismatch]
   50 | int keyserver_import_name (ctrl_t ctrl,
      |     ^
test-stubs.c:229:1: note: type mismatch in parameter 3
  229 | keyserver_import_name (const char *name,struct keyserver_spec *spec)
      | ^
test-stubs.c:229:1: note: 'keyserver_import_name' was previously declared here
keyserver-internal.h:46:13: warning: type of 'keyserver_import_pka' does not match original declaration [-Wlto-type-mismatch]
   46 | gpg_error_t keyserver_import_pka (ctrl_t ctrl, const char *name,
      |             ^
test-stubs.c:209:1: note: return value type mismatch
  209 | keyserver_import_pka (const char *name,unsigned char *fpr)
      | ^
test-stubs.c:209:1: note: type 'int' should match type 'gpg_error_t'
test-stubs.c:209:1: note: 'keyserver_import_pka' was previously declared here
keyserver-internal.h:44:5: warning: type of 'keyserver_import_cert' does not match original declaration [-Wlto-type-mismatch]
   44 | int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
      |     ^
test-stubs.c:202:1: note: type mismatch in parameter 2
  202 | keyserver_import_cert (const char *name)
      | ^
test-stubs.c:202:1: note: 'keyserver_import_cert' was previously declared here
keyserver-internal.h:39:5: warning: type of 'keyserver_import_keyid' does not match original declaration [-Wlto-type-mismatch]
   39 | int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
      |     ^
test-stubs.c:181:1: note: type mismatch in parameter 3
  181 | keyserver_import_keyid (u32 *keyid, void *dummy, int quick)
      | ^
test-stubs.c:181:1: note: 'keyserver_import_keyid' was previously declared here
photoid.h:31:6: warning: type of 'show_photos' does not match original declaration [-Wlto-type-mismatch]
   31 | void show_photos (ctrl_t ctrl, const struct user_attribute *attrs, int count,
      |      ^
test-stubs.c:355:1: note: type mismatch in parameter 2
  355 | show_photos (const struct user_attribute *attrs, int count, PKT_public_key *pk)
      | ^
test-stubs.c:355:1: note: 'show_photos' was previously declared here
keyserver-internal.h:31:24: warning: type of 'parse_keyserver_uri' does not match original declaration [-Wlto-type-mismatch]
   31 | struct keyserver_spec *parse_keyserver_uri (const char *string,
      |                        ^
test-stubs.c:337:1: note: type mismatch in parameter 3
  337 | parse_keyserver_uri (const char *uri, int require_scheme,
      | ^
test-stubs.c:337:1: note: 'parse_keyserver_uri' was previously declared here
keyserver-internal.h:53:5: warning: type of 'keyserver_import_ldap' does not match original declaration [-Wlto-type-mismatch]
   53 | int keyserver_import_ldap (ctrl_t ctrl, const char *name,
      |     ^
test-stubs.c:237:1: note: type mismatch in parameter 2
  237 | keyserver_import_ldap (const char *name)
      | ^
test-stubs.c:237:1: note: 'keyserver_import_ldap' was previously declared here
keyserver-internal.h:50:5: warning: type of 'keyserver_import_name' does not match original declaration [-Wlto-type-mismatch]
   50 | int keyserver_import_name (ctrl_t ctrl,
      |     ^
test-stubs.c:229:1: note: type mismatch in parameter 3
  229 | keyserver_import_name (const char *name,struct keyserver_spec *spec)
      | ^
test-stubs.c:229:1: note: 'keyserver_import_name' was previously declared here
keyserver-internal.h:46:13: warning: type of 'keyserver_import_pka' does not match original declaration [-Wlto-type-mismatch]
   46 | gpg_error_t keyserver_import_pka (ctrl_t ctrl, const char *name,
      |             ^
test-stubs.c:209:1: note: return value type mismatch
  209 | keyserver_import_pka (const char *name,unsigned char *fpr)
      | ^
test-stubs.c:209:1: note: type 'int' should match type 'gpg_error_t'
test-stubs.c:209:1: note: 'keyserver_import_pka' was previously declared here
keyserver-internal.h:44:5: warning: type of 'keyserver_import_cert' does not match original declaration [-Wlto-type-mismatch]
   44 | int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
      |     ^
test-stubs.c:202:1: note: type mismatch in parameter 2
  202 | keyserver_import_cert (const char *name)
      | ^
test-stubs.c:202:1: note: 'keyserver_import_cert' was previously declared here
keyserver-internal.h:39:5: warning: type of 'keyserver_import_keyid' does not match original declaration [-Wlto-type-mismatch]
   39 | int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
      |     ^
test-stubs.c:181:1: note: type mismatch in parameter 3
  181 | keyserver_import_keyid (u32 *keyid, void *dummy, int quick)
      | ^
test-stubs.c:181:1: note: 'keyserver_import_keyid' was previously declared here
photoid.h:31:6: warning: type of 'show_photos' does not match original declaration [-Wlto-type-mismatch]
   31 | void show_photos (ctrl_t ctrl, const struct user_attribute *attrs, int count,
      |      ^
gpgv.c:592:1: note: type mismatch in parameter 2
  592 | show_photos (const struct user_attribute *attrs, int count, PKT_public_key *pk)
      | ^
gpgv.c:592:1: note: 'show_photos' was previously declared here
keyserver-internal.h:31:24: warning: type of 'parse_keyserver_uri' does not match original declaration [-Wlto-type-mismatch]
   31 | struct keyserver_spec *parse_keyserver_uri (const char *string,
      |                        ^
gpgv.c:574:1: note: type mismatch in parameter 3
  574 | parse_keyserver_uri (const char *uri, int require_scheme,
      | ^
gpgv.c:574:1: note: 'parse_keyserver_uri' was previously declared here
keyserver-internal.h:53:5: warning: type of 'keyserver_import_ldap' does not match original declaration [-Wlto-type-mismatch]
   53 | int keyserver_import_ldap (ctrl_t ctrl, const char *name,
      |     ^
gpgv.c:472:1: note: type mismatch in parameter 2
  472 | keyserver_import_ldap (const char *name)
      | ^
gpgv.c:472:1: note: 'keyserver_import_ldap' was previously declared here
keyserver-internal.h:50:5: warning: type of 'keyserver_import_name' does not match original declaration [-Wlto-type-mismatch]
   50 | int keyserver_import_name (ctrl_t ctrl,
      |     ^
gpgv.c:464:1: note: type mismatch in parameter 3
  464 | keyserver_import_name (const char *name,struct keyserver_spec *spec)
      | ^
gpgv.c:464:1: note: 'keyserver_import_name' was previously declared here
keyserver-internal.h:46:13: warning: type of 'keyserver_import_pka' does not match original declaration [-Wlto-type-mismatch]
   46 | gpg_error_t keyserver_import_pka (ctrl_t ctrl, const char *name,
      |             ^
gpgv.c:444:1: note: return value type mismatch
  444 | keyserver_import_pka (const char *name,unsigned char *fpr)
      | ^
gpgv.c:444:1: note: type 'int' should match type 'gpg_error_t'
gpgv.c:444:1: note: 'keyserver_import_pka' was previously declared here
keyserver-internal.h:44:5: warning: type of 'keyserver_import_cert' does not match original declaration [-Wlto-type-mismatch]
   44 | int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
      |     ^
gpgv.c:437:1: note: type mismatch in parameter 2
  437 | keyserver_import_cert (const char *name)
      | ^
gpgv.c:437:1: note: 'keyserver_import_cert' was previously declared here
keyserver-internal.h:39:5: warning: type of 'keyserver_import_keyid' does not match original declaration [-Wlto-type-mismatch]
   39 | int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
      |     ^
gpgv.c:416:1: note: type mismatch in parameter 3
  416 | keyserver_import_keyid (u32 *keyid, void *dummy, int quick)
      | ^
gpgv.c:416:1: note: 'keyserver_import_keyid' was previously declared here
cvt-openpgp.h:27:13: warning: type of 'convert_from_openpgp_native' does not match original declaration [-Wlto-type-mismatch]
   27 | gpg_error_t convert_from_openpgp_native (ctrl_t ctrl,
      |             ^
t-protect.c:343:1: note: type mismatch in parameter 4
  343 | convert_from_openpgp_native (gcry_sexp_t s_pgp, const char *passphrase,
      | ^
t-protect.c:343:1: note: 'convert_from_openpgp_native' was previously declared here
scdaemon.c: In function 'handle_connections':
scdaemon.c:1391:11: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
 1391 |           read (pipe_fd[0], buf, sizeof buf);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scdaemon.c: In function 'scd_kick_the_loop':
scdaemon.c:1232:3: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
 1232 |   write (notify_fd, "", 1);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
dns.c:4282:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '#pragma'
 4282 | #pragma GCC   diagnostic ignored "-Wstrict-prototypes"
      |         ^~~
dns.c:4310:15: error: expected ';' before 'static'
 4310 | DNS_PRAGMA_POP  /*(-Wstrict-prototypes)*/
      |               ^
      |               ;
......
 4314 | static const struct dns_rrtype *dns_rrtype(enum dns_type type) {
      | ~~~~~~         
dns.c:6038:1: error: unknown type name 'DNS_PRAGMA_PUSH'
 6038 | DNS_PRAGMA_PUSH
      | ^~~~~~~~~~~~~~~
dns.c:6039:17: error: expected ';' before 'static'
 6039 | DNS_PRAGMA_QUIET
      |                 ^
      |                 ;
 6040 | 
 6041 | static int dns_nssconf_k2c(int k) {
      | ~~~~~~           
dns.c:6073:15: error: expected ';' before 'int'
 6073 | DNS_PRAGMA_POP
      |               ^
      |               ;
......
 6076 | int dns_nssconf_loadfile(struct dns_resolv_conf *resconf, FILE *fp) {
      | ~~~            
make[2]: *** [Makefile:994: dns.o] Error 1
make[2]: *** Waiting for unfinished jobs....
dns.c:4282:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '#pragma'
 4282 | #pragma GCC   diagnostic ignored "-Wstrict-prototypes"
      |         ^~~
dns.c:4310:15: error: expected ';' before 'static'
 4310 | DNS_PRAGMA_POP  /*(-Wstrict-prototypes)*/
      |               ^
      |               ;
......
 4314 | static const struct dns_rrtype *dns_rrtype(enum dns_type type) {
      | ~~~~~~         
dns.c:6038:1: error: unknown type name 'DNS_PRAGMA_PUSH'
 6038 | DNS_PRAGMA_PUSH
      | ^~~~~~~~~~~~~~~
dns.c:6039:17: error: expected ';' before 'static'
 6039 | DNS_PRAGMA_QUIET
      |                 ^
      |                 ;
 6040 | 
 6041 | static int dns_nssconf_k2c(int k) {
      | ~~~~~~           
dns.c:6073:15: error: expected ';' before 'int'
 6073 | DNS_PRAGMA_POP
      |               ^
      |               ;
......
 6076 | int dns_nssconf_loadfile(struct dns_resolv_conf *resconf, FILE *fp) {
      | ~~~

Event Timeline

kloczek created this object in space S1 Public.
werner claimed this task.
werner added a subscriber: werner.

There are reasons why we sometimes don't consult the return code. That is even declared in the code with a cast to void. Further we use gpg_error_t and int interchangeable under the assumption that an unsigned int and an int value have the same bit pattern.

In this case it is not about don't consult the return code or casting sometning byt messy declaration in header files and .c files.
Please have look closer one more time on [-Wlto-type-mismatch] warnings.

test-stubs.c:374:1: note: 'show_photos' was previously declared here
keyserver-internal.h:35:24: warning: type of 'parse_keyserver_uri' does not match original declaration [-Wlto-type-mismatch]
   35 | struct keyserver_spec *parse_keyserver_uri (const char *string,
      |                        ^
test-stubs.c:356:1: note: type mismatch in parameter 3
  356 | parse_keyserver_uri (const char *uri, int require_scheme,
      | ^
test-stubs.c:356:1: note: 'parse_keyserver_uri' was previously declared here
keyserver-internal.h:60:5: warning: type of 'keyserver_import_ldap' does not match original declaration [-Wlto-type-mismatch]
   60 | int keyserver_import_ldap (ctrl_t ctrl, const char *name,
      |     ^
test-stubs.c:243:1: note: type mismatch in parameter 2
  243 | keyserver_import_ldap (const char *name)
      | ^
test-stubs.c:243:1: note: 'keyserver_import_ldap' was previously declared here
keyserver-internal.h:57:5: warning: type of 'keyserver_import_name' does not match original declaration [-Wlto-type-mismatch]
   57 | int keyserver_import_name (ctrl_t ctrl,
      |     ^
test-stubs.c:224:1: note: type mismatch in parameter 3
  224 | keyserver_import_name (const char *name,struct keyserver_spec *spec)
      | ^
test-stubs.c:224:1: note: 'keyserver_import_name' was previously declared here
keyserver-internal.h:50:5: warning: type of 'keyserver_import_cert' does not match original declaration [-Wlto-type-mismatch]
   50 | int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
      |     ^
test-stubs.c:205:1: note: type mismatch in parameter 2
  205 | keyserver_import_cert (const char *name)
      | ^
test-stubs.c:205:1: note: 'keyserver_import_cert' was previously declared here
keyserver-internal.h:44:5: warning: type of 'keyserver_import_keyid' does not match original declaration [-Wlto-type-mismatch]
   44 | int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
      |     ^
test-stubs.c:184:1: note: type mismatch in parameter 3
  184 | keyserver_import_keyid (u32 *keyid, void *dummy, unsigned int flags)
      | ^
test-stubs.c:184:1: note: 'keyserver_import_keyid' was previously declared here
photoid.h:31:6: warning: type of 'show_photos' does not match original declaration [-Wlto-type-mismatch]
   31 | void show_photos (ctrl_t ctrl, const struct user_attribute *attrs, int count,
      |      ^
test-stubs.c:374:1: note: type mismatch in parameter 2
  374 | show_photos (const struct user_attribute *attrs, int count, PKT_public_key *pk)
      | ^
test-stubs.c:374:1: note: 'show_photos' was previously declared here
keyserver-internal.h:35:24: warning: type of 'parse_keyserver_uri' does not match original declaration [-Wlto-type-mismatch]
   35 | struct keyserver_spec *parse_keyserver_uri (const char *string,
      |                        ^
test-stubs.c:356:1: note: type mismatch in parameter 3
  356 | parse_keyserver_uri (const char *uri, int require_scheme,
      | ^
test-stubs.c:356:1: note: 'parse_keyserver_uri' was previously declared here
keyserver-internal.h:60:5: warning: type of 'keyserver_import_ldap' does not match original declaration [-Wlto-type-mismatch]
   60 | int keyserver_import_ldap (ctrl_t ctrl, const char *name,
      |     ^
test-stubs.c:243:1: note: type mismatch in parameter 2
  243 | keyserver_import_ldap (const char *name)
      | ^
test-stubs.c:243:1: note: 'keyserver_import_ldap' was previously declared here
keyserver-internal.h:57:5: warning: type of 'keyserver_import_name' does not match original declaration [-Wlto-type-mismatch]
   57 | int keyserver_import_name (ctrl_t ctrl,
      |     ^
test-stubs.c:224:1: note: type mismatch in parameter 3
  224 | keyserver_import_name (const char *name,struct keyserver_spec *spec)
      | ^
test-stubs.c:224:1: note: 'keyserver_import_name' was previously declared here
keyserver-internal.h:50:5: warning: type of 'keyserver_import_cert' does not match original declaration [-Wlto-type-mismatch]
   50 | int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
      |     ^
test-stubs.c:205:1: note: type mismatch in parameter 2
  205 | keyserver_import_cert (const char *name)
      | ^
test-stubs.c:205:1: note: 'keyserver_import_cert' was previously declared here
keyserver-internal.h:44:5: warning: type of 'keyserver_import_keyid' does not match original declaration [-Wlto-type-mismatch]
   44 | int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
      |     ^
test-stubs.c:184:1: note: type mismatch in parameter 3
  184 | keyserver_import_keyid (u32 *keyid, void *dummy, unsigned int flags)
      | ^
test-stubs.c:184:1: note: 'keyserver_import_keyid' was previously declared here
photoid.h:31:6: warning: type of 'show_photos' does not match original declaration [-Wlto-type-mismatch]
   31 | void show_photos (ctrl_t ctrl, const struct user_attribute *attrs, int count,
      |      ^
test-stubs.c:374:1: note: type mismatch in parameter 2
  374 | show_photos (const struct user_attribute *attrs, int count, PKT_public_key *pk)
      | ^
test-stubs.c:374:1: note: 'show_photos' was previously declared here
keyserver-internal.h:35:24: warning: type of 'parse_keyserver_uri' does not match original declaration [-Wlto-type-mismatch]
   35 | struct keyserver_spec *parse_keyserver_uri (const char *string,
      |                        ^
test-stubs.c:356:1: note: type mismatch in parameter 3
  356 | parse_keyserver_uri (const char *uri, int require_scheme,
      | ^
test-stubs.c:356:1: note: 'parse_keyserver_uri' was previously declared here
keyserver-internal.h:60:5: warning: type of 'keyserver_import_ldap' does not match original declaration [-Wlto-type-mismatch]
   60 | int keyserver_import_ldap (ctrl_t ctrl, const char *name,
      |     ^
test-stubs.c:243:1: note: type mismatch in parameter 2
  243 | keyserver_import_ldap (const char *name)
      | ^
test-stubs.c:243:1: note: 'keyserver_import_ldap' was previously declared here
keyserver-internal.h:57:5: warning: type of 'keyserver_import_name' does not match original declaration [-Wlto-type-mismatch]
   57 | int keyserver_import_name (ctrl_t ctrl,
      |     ^
test-stubs.c:224:1: note: type mismatch in parameter 3
  224 | keyserver_import_name (const char *name,struct keyserver_spec *spec)
      | ^
test-stubs.c:224:1: note: 'keyserver_import_name' was previously declared here
keyserver-internal.h:50:5: warning: type of 'keyserver_import_cert' does not match original declaration [-Wlto-type-mismatch]
   50 | int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
      |     ^
test-stubs.c:205:1: note: type mismatch in parameter 2
  205 | keyserver_import_cert (const char *name)
      | ^
test-stubs.c:205:1: note: 'keyserver_import_cert' was previously declared here
keyserver-internal.h:44:5: warning: type of 'keyserver_import_keyid' does not match original declaration [-Wlto-type-mismatch]
   44 | int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
      |     ^
test-stubs.c:184:1: note: type mismatch in parameter 3
  184 | keyserver_import_keyid (u32 *keyid, void *dummy, unsigned int flags)
      | ^
test-stubs.c:184:1: note: 'keyserver_import_keyid' was previously declared here
photoid.h:31:6: warning: type of 'show_photos' does not match original declaration [-Wlto-type-mismatch]
   31 | void show_photos (ctrl_t ctrl, const struct user_attribute *attrs, int count,
      |      ^
gpgv.c:617:1: note: type mismatch in parameter 2
  617 | show_photos (const struct user_attribute *attrs, int count, PKT_public_key *pk)
      | ^
gpgv.c:617:1: note: 'show_photos' was previously declared here
keyserver-internal.h:35:24: warning: type of 'parse_keyserver_uri' does not match original declaration [-Wlto-type-mismatch]
   35 | struct keyserver_spec *parse_keyserver_uri (const char *string,
      |                        ^
gpgv.c:599:1: note: type mismatch in parameter 3
  599 | parse_keyserver_uri (const char *uri, int require_scheme,
      | ^
gpgv.c:599:1: note: 'parse_keyserver_uri' was previously declared here
keyserver-internal.h:60:5: warning: type of 'keyserver_import_ldap' does not match original declaration [-Wlto-type-mismatch]
   60 | int keyserver_import_ldap (ctrl_t ctrl, const char *name,
      |     ^
gpgv.c:485:1: note: type mismatch in parameter 2
  485 | keyserver_import_ldap (const char *name)
      | ^
gpgv.c:485:1: note: 'keyserver_import_ldap' was previously declared here
keyserver-internal.h:57:5: warning: type of 'keyserver_import_name' does not match original declaration [-Wlto-type-mismatch]
   57 | int keyserver_import_name (ctrl_t ctrl,
      |     ^
gpgv.c:466:1: note: type mismatch in parameter 3
  466 | keyserver_import_name (const char *name,struct keyserver_spec *spec)
      | ^
gpgv.c:466:1: note: 'keyserver_import_name' was previously declared here
keyserver-internal.h:50:5: warning: type of 'keyserver_import_cert' does not match original declaration [-Wlto-type-mismatch]
   50 | int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
      |     ^
gpgv.c:447:1: note: type mismatch in parameter 2
  447 | keyserver_import_cert (const char *name)
      | ^
gpgv.c:447:1: note: 'keyserver_import_cert' was previously declared here
keyserver-internal.h:44:5: warning: type of 'keyserver_import_keyid' does not match original declaration [-Wlto-type-mismatch]
   44 | int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
      |     ^
gpgv.c:426:1: note: type mismatch in parameter 3
  426 | keyserver_import_keyid (u32 *keyid, void *dummy, unsigned int flags)
      | ^
gpgv.c:426:1: note: 'keyserver_import_keyid' was previously declared here
certchain.c:2123:1: note: in a call to function 'gpgsm_validate_chain'
 2123 | gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime,
      | ^
cvt-openpgp.h:27:13: warning: type of 'convert_from_openpgp_native' does not match original declaration [-Wlto-type-mismatch]
   27 | gpg_error_t convert_from_openpgp_native (ctrl_t ctrl,
      |             ^
t-protect.c:344:1: note: type mismatch in parameter 4
  344 | convert_from_openpgp_native (gcry_sexp_t s_pgp, const char *passphrase,
      | ^
t-protect.c:344:1: note: 'convert_from_openpgp_native' was previously declared here

Other part are [-Wstringop-overflow=] warnings

call-dirmngr.c: In function 'gpgsm_dirmngr_isvalid.part.0':
call-dirmngr.c:575:24: warning: 'gpgsm_validate_chain' accessing 16 bytes in a region of size 1 [-Wstringop-overflow=]
  575 |                   rc = gpgsm_validate_chain (ctrl, rspcert, "", NULL, 0, NULL,
      |                        ^
call-dirmngr.c:575:24: note: referencing argument 3 of type 'char *'
certchain.c:2123:1: note: in a call to function 'gpgsm_validate_chain'
 2123 | gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime,
      | ^
certlist.c: In function 'gpgsm_add_to_certlist':
certlist.c:446:22: warning: 'gpgsm_validate_chain' accessing 16 bytes in a region of size 1 [-Wstringop-overflow=]
  446 |                 rc = gpgsm_validate_chain (ctrl, cert, "", NULL,
      |                      ^
certlist.c:446:22: note: referencing argument 3 of type 'char *'
certchain.c:2123:1: note: in a call to function 'gpgsm_validate_chain'
 2123 | gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime,
      | ^
keylist.c: In function 'list_cert_std':
keylist.c:1387:13: warning: 'gpgsm_validate_chain' accessing 16 bytes in a region of size 1 [-Wstringop-overflow=]
 1387 |       err = gpgsm_validate_chain (ctrl, cert, "", NULL, 1, fp, 0, NULL);
      |             ^
keylist.c:1387:13: note: referencing argument 3 of type 'char *'
certchain.c:2123:1: note: in a call to function 'gpgsm_validate_chain'
 2123 | gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime,
      | ^
keylist.c: In function 'list_cert_colon':
keylist.c:451:14: warning: 'gpgsm_validate_chain' accessing 16 bytes in a region of size 1 [-Wstringop-overflow=]
  451 |     valerr = gpgsm_validate_chain (ctrl, cert, "", NULL, 1, NULL, 0, NULL);
      |              ^
keylist.c:451:14: note: referencing argument 3 of type 'char *'
certchain.c:2123:1: note: in a call to function 'gpgsm_validate_chain'
 2123 | gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime,
      | ^
keylist.c: In function 'list_cert_raw.constprop':
keylist.c:1139:13: warning: 'gpgsm_validate_chain' accessing 16 bytes in a region of size 1 [-Wstringop-overflow=]
 1139 |       err = gpgsm_validate_chain (ctrl, cert, "", NULL, 1, fp, 0, NULL);
      |             ^
keylist.c:1139:13: note: referencing argument 3 of type 'char *'
certchain.c:2123:1: note: in a call to function 'gpgsm_validate_chain'
 2123 | gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime,
      | ^
import.c: In function 'check_and_store':
import.c:194:10: warning: 'gpgsm_validate_chain' accessing 16 bytes in a region of size 1 [-Wstringop-overflow=]
  194 |     rc = gpgsm_validate_chain (ctrl, cert, "", NULL, 0, NULL, 0, NULL);
      |          ^
import.c:194:10: note: referencing argument 3 of type 'char *'
certchain.c:2123:1: note: in a call to function 'gpgsm_validate_chain'
 2123 | gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime,
      | ^
sign.c: In function 'gpgsm_sign':
sign.c:507:14: warning: 'gpgsm_validate_chain' accessing 16 bytes in a region of size 1 [-Wstringop-overflow=]
  507 |         rc = gpgsm_validate_chain (ctrl, cert, "", NULL, 0, NULL, 0, NULL);
      |              ^
sign.c:507:14: note: referencing argument 3 of type 'char *'
certchain.c:2123:1: note: in a call to function 'gpgsm_validate_chain'
 2123 | gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime,
      | ^