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

Nitpicks from clang-scan #528

Merged
merged 2 commits into from
Jan 28, 2022
Merged

Nitpicks from clang-scan #528

merged 2 commits into from
Jan 28, 2022

Commits on Jan 28, 2022

  1. network_sleep: add sanity check for compilers

    Compilers and static analysis tools can't work out that sp is always
    non-NULL when we use it, due to the combination of:
    
    	for (h = 0; h < sleepers_getsize(sleepers); h++) {
    		sp = *sleepers_get(sleepers, h);
    		...
    	}
    
    	if (h == sleepers_getsize(sleepers)) {
    		...
    	}
    
    	/* Use sp. */
    
    Reported by:	gcc, clang, clang scan-build
    gperciva committed Jan 28, 2022
    Configuration menu
    Copy the full SHA
    c7fc1f1 View commit details
    Browse the repository at this point in the history
  2. Indicate that some variables are not read later in the function

    archive_read_format_tar_read_advance() is not part of libarchive (it's a
    tarsnap-specific addition).
    
    Reported by:	clang scan-build
    gperciva committed Jan 28, 2022
    Configuration menu
    Copy the full SHA
    ba62ff9 View commit details
    Browse the repository at this point in the history