Jean-Pierre André <[email protected]> wrote:

> Szabolcs Szakacsits wrote:

> > About 0007, ntfs_log_* guarantee that errno is not modified.

> I agree.

The clang complaint is:

4183 if (ntfs_cluster_free(vol, na, 0, -1) < 0) {
4184     err = errno;
         "Value stored to 'err' is never read"
4185     ntfs_log_perror("Eeek! Failed to release allocated clusters");
4186     ntfs_log_trace("Ignoring error and leaving behind wasted "
                        "clusters.\n");

'err' is indeed not read later on, so my assumption was that one of
the function below it modifies errno, and that it has to be restored.

If that's not the case, line 4184 should probably be removed.

> I also reject 0006, which would probably make the
> variable cnt uninitialized when first used.

The first use of cnt seems to be storing the return code of
mbrtowc(), so I don't see how it could be used uninitialized,
but of course the patch is unimportant anyway and I wouldn't
have submitted it on its own.

Thanks for the quick response.

Fabian

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to