Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings during build on alpine #11

Open
waldner opened this issue May 13, 2019 · 4 comments
Open

Warnings during build on alpine #11

waldner opened this issue May 13, 2019 · 4 comments

Comments

@waldner
Copy link

waldner commented May 13, 2019

Building rsync_bpc under alpine linux, many warnings are emitted, although the compilation finally succeeds. See the attached file:
warnings.txt

@craigbarratt
Copy link
Contributor

Most of these should be fixed in the latest releases.

@waldner
Copy link
Author

waldner commented Oct 7, 2020

I'm still seeing those wirh rsync-bpc 3.1.2.2. Do you mean with 3.1.3 beta?

@craigbarratt
Copy link
Contributor

Yes. I should release 3.1.3.0 shortly, which only has a couple of minor changes from 3.1.3beta1.

@craigbarratt craigbarratt reopened this Oct 7, 2020
@waldner
Copy link
Author

waldner commented Oct 9, 2020

With 3.1.3.0 only the following warnings are produced:

gcc -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W  -c socket.c -o socket.o
socket.c: In function 'open_socket_out':
socket.c:76:59: warning: '%s' directive output may be truncated writing up to 1023 bytes into a region of size between 976 and 1005 [-Wformat-truncation=]
   76 |  snprintf(buffer, sizeof buffer, "CONNECT %s:%d HTTP/1.0%s%s\r\n\r\n",
      |                                                           ^~
   77 |    host, port, authhdr, authbuf);
      |                         ~~~~~~~                            
socket.c:76:2: note: 'snprintf' output 24 or more bytes (assuming 1076) into a destination of size 1024
   76 |  snprintf(buffer, sizeof buffer, "CONNECT %s:%d HTTP/1.0%s%s\r\n\r\n",
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   77 |    host, port, authhdr, authbuf);
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
gcc -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W  -c popt/popt.c -o popt/popt.o
popt/popt.c: In function 'expandNextArg':
popt/popt.c:629:6: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
  629 |      strncpy(te, a, alen); te += alen;
      |      ^~~~~~~~~~~~~~~~~~~~
popt/popt.c:624:13: note: length computed here
  624 |      alen = strlen(a);
      |             ^~~~~~~~~

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

No branches or pull requests

2 participants