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

fix three compile warnings #221

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Jun 18, 2023

  1. fix warning: ‘strndup’ specified bound 4096 exceeds source size 2 [-W…

    …stringop-overread]
    
    In function ‘allocate_paths’,
        inlined from ‘xfer_options_parse_args’ at xfer-options.c:388:8:
    xfer-options.c:69:34: warning: ‘strndup’ specified bound 4096 exceeds source size 2 [-Wstringop-overread]
       69 |                 xfer->paths[0] = strndup("-", PATH_MAX);
          |                                  ^~~~~~~~~~~~~~~~~~~~~~
    critkitten authored Jun 18, 2023
    Configuration menu
    Copy the full SHA
    041c190 View commit details
    Browse the repository at this point in the history
  2. fix ssize_t bytes_written; if (receive_file != -1) { bytes_written = …

    …write(receive_file, buf, length); if (bytes_written != length) { // handle the error, e.g., print an error message or break the loop error("write() failed:
    
    fix  ssize_t bytes_written;  if (receive_file != -1) {     bytes_written = write(receive_file, buf, length);     if (bytes_written != length) {         // handle the error, e.g., print an error message or brea
    critkitten authored Jun 18, 2023
    Configuration menu
    Copy the full SHA
    32b5f63 View commit details
    Browse the repository at this point in the history
  3. fix utils.c:94:15: warning: ignoring return value of ‘write’ declared…

    … with attribute ‘warn_unused_result’ [-Wunused-result]
    
    fix utils.c:94:15: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    critkitten authored Jun 18, 2023
    Configuration menu
    Copy the full SHA
    71b5ee6 View commit details
    Browse the repository at this point in the history
  4. Update utils.c spaces

    critkitten authored Jun 18, 2023
    Configuration menu
    Copy the full SHA
    62b4073 View commit details
    Browse the repository at this point in the history