Skip to content

Conversation

@feckert
Copy link

@feckert feckert commented Sep 2, 2025

This packages does not build anymore on OpenWrt master.
This two commits fixes a build error and a build warning

This change fixes the following compilation build error:

tftpd_pcre.c:109:37: error: passing argument 1 of 'pcre2_substring_list_free_8' from incompatible pointer type [-Wincompatible-pointer-types]
  109 |           pcre2_substring_list_free((const PCRE2_UCHAR **)substrlist);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     |
      |                                     const PCRE2_UCHAR8 ** {aka const unsigned char **}
In file included from tftpd_pcre.h:24,
                 from tftpd_pcre.c:35:

Signed-off-by: Florian Eckert <[email protected]>
This change fixes the following compilation build warning:

logger.c:117:47: warning: format '%li' expects argument of type 'long int', but argument 7 has type 'pthread_t' {aka 'struct __pthread *'} [-Wformat=]
  117 |                fprintf(log_fp, "%s %s %s[%d.%li]: %s\n", time_buf, hostname,
      |                                             ~~^
      |                                               |
      |                                               long int
  118 |                        log_ident, getpid(), pthread_self(), message);
      |                                             ~~~~~~~~~~~~~~
      |                                             |
      |                                             pthread_t {aka struct __pthread *}
logger.c:124:47: warning: format '%li' expects argument of type 'long int', but argument 7 has type 'pthread_t' {aka 'struct __pthread *'} [-Wformat=]
  124 |                fprintf(stderr, "%s %s %s[%d.%li]: %s\n", time_buf, hostname,
      |                                             ~~^
      |                                               |
      |                                               long int
  125 |                        log_ident, getpid(), pthread_self(), message);
      |                                             ~~~~~~~~~~~~~~
      |                                             |
      |                                             pthread_t {aka struct __pthread *}

Signed-off-by: Florian Eckert <[email protected]>
@feckert feckert force-pushed the pr/20250902-build-fixes branch from 12b1bf5 to d3fc756 Compare September 2, 2025 12:25
@feckert feckert changed the title Fixes build error an gcc14 and build warning Fixes build error and build warning Sep 2, 2025
feckert added a commit to TDT-AG/packages that referenced this pull request Sep 2, 2025
This patch fixes the following compilation build warning:

logger.c:117:47: warning: format '%li' expects argument of type 'long int', but argument 7 has type
  117 |                fprintf(log_fp, "%s %s %s[%d.%li]: %s\n", time_buf, hostname,
      |                                             ~~^
      |                                               |
      |                                               long int
  118 |                        log_ident, getpid(), pthread_self(), message);
      |                                             ~~~~~~~~~~~~~~
      |                                             |
      |                                             pthread_t {aka struct __pthread *}
logger.c:124:47: warning: format '%li' expects argument of type 'long int', but argument 7 has type
  124 |                fprintf(stderr, "%s %s %s[%d.%li]: %s\n", time_buf, hostname,
      |                                             ~~^
      |                                               |
      |                                               long int
  125 |                        log_ident, getpid(), pthread_self(), message);
      |                                             ~~~~~~~~~~~~~~
      |                                             |
      |                                             pthread_t {aka struct __pthread *}

I have also submitted the change to the upstream project:
madmartin/atftp#2

Signed-off-by: Florian Eckert <[email protected]>
feckert added a commit to TDT-AG/packages that referenced this pull request Sep 2, 2025
This patch fixes the following compilation build error for gcc14:

tftpd_pcre.c:109:37: error: passing argument 1 of 'pcre2_substring_list_free_8' from incompatible p
  109 |           pcre2_substring_list_free((const PCRE2_UCHAR **)substrlist);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     |
      |                                     const PCRE2_UCHAR8 ** {aka const unsigned char **}
In file included from tftpd_pcre.h:24,
                 from tftpd_pcre.c:35:

I have also submitted the change to the upstream project:
madmartin/atftp#2

Signed-off-by: Florian Eckert <[email protected]>
feckert added a commit to openwrt/packages that referenced this pull request Sep 8, 2025
This patch fixes the following compilation build warning:

logger.c:117:47: warning: format '%li' expects argument of type 'long int', but argument 7 has type
  117 |                fprintf(log_fp, "%s %s %s[%d.%li]: %s\n", time_buf, hostname,
      |                                             ~~^
      |                                               |
      |                                               long int
  118 |                        log_ident, getpid(), pthread_self(), message);
      |                                             ~~~~~~~~~~~~~~
      |                                             |
      |                                             pthread_t {aka struct __pthread *}
logger.c:124:47: warning: format '%li' expects argument of type 'long int', but argument 7 has type
  124 |                fprintf(stderr, "%s %s %s[%d.%li]: %s\n", time_buf, hostname,
      |                                             ~~^
      |                                               |
      |                                               long int
  125 |                        log_ident, getpid(), pthread_self(), message);
      |                                             ~~~~~~~~~~~~~~
      |                                             |
      |                                             pthread_t {aka struct __pthread *}

I have also submitted the change to the upstream project:
madmartin/atftp#2

Signed-off-by: Florian Eckert <[email protected]>
feckert added a commit to openwrt/packages that referenced this pull request Sep 8, 2025
This patch fixes the following compilation build error for gcc14:

tftpd_pcre.c:109:37: error: passing argument 1 of 'pcre2_substring_list_free_8' from incompatible p
  109 |           pcre2_substring_list_free((const PCRE2_UCHAR **)substrlist);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     |
      |                                     const PCRE2_UCHAR8 ** {aka const unsigned char **}
In file included from tftpd_pcre.h:24,
                 from tftpd_pcre.c:35:

I have also submitted the change to the upstream project:
madmartin/atftp#2

Signed-off-by: Florian Eckert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant