DE-IBH/apt-dater

incompatible integer to pointer conversion error

chenrui333 opened this issue · 1 comments

While regression building apt-dater 1.0.4, I ran into some incompatible integer to pointer conversion build failures as below:

  clang -DHAVE_CONFIG_H -I. -I.. -I/opt/homebrew/Cellar/pcre2/10.44/include -I/opt/homebrew/Cellar/glib/2.80.4/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.80.4/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include   -I/opt/homebrew/Cellar/pcre2/10.44/include -I/opt/homebrew/Cellar/glib/2.80.4/include -I/opt/homebrew/Cellar/glib/2.80.4/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.80.4/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ffi   -Wall -DPKGLIBDIR='"'/opt/homebrew/Cellar/apt-dater/1.0.4_1/lib/apt-dater'"' -DSOURCE_DATE_UTC="\"\"" -Wno-incompatible-function-pointer-types -c -o adsh.o adsh.c
  screen.c:49:21: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const gchar *' (aka 'const char *') [-Wint-conversion]
      g_strlcpy(sdir, sizeof(sdir), getenv("SCREENDIR"));
                      ^~~~~~~~~~~~
  /opt/homebrew/Cellar/glib/2.80.4/include/glib-2.0/glib/gstrfuncs.h:124:20: note: passing argument to parameter 'src' here
                                          const gchar  *src,
                                                        ^
  screen.c:49:35: error: incompatible pointer to integer conversion passing 'char *' to parameter of type 'gsize' (aka 'unsigned long') [-Wint-conversion]
      g_strlcpy(sdir, sizeof(sdir), getenv("SCREENDIR"));
                                    ^~~~~~~~~~~~~~~~~~~
  /opt/homebrew/Cellar/glib/2.80.4/include/glib-2.0/glib/gstrfuncs.h:125:20: note: passing argument to parameter 'dest_size' here
                                          gsize         dest_size);
                                                        ^
  2 errors generated.

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/9896583478/job/27339309762?pr=177051
relates to Homebrew/homebrew-core#177051

Thanks for reporting this issue, it was fixed in the meantime by #182.