Summary: | [patch] chio(8) fix some harmless uninitialized argument warnings | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Ulrich Spoerlein <uqs> | ||||
Component: | bin | Assignee: | Ulrich Spörlein <uqs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | 7.2-STABLE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Ulrich Spoerlein
2009-11-08 11:00:07 UTC
Responsible Changed From-To: freebsd-bugs->uqs Assign my PRs to myself Author: uqs Date: Wed Jun 2 09:34:41 2010 New Revision: 208730 URL: http://svn.freebsd.org/changeset/base/208730 Log: Zero struct before reading from it PR: 140384 Found by: clang static analyzer MFC after: 3 weeks Modified: head/bin/chio/chio.c Modified: head/bin/chio/chio.c ============================================================================== --- head/bin/chio/chio.c Wed Jun 2 08:43:18 2010 (r208729) +++ head/bin/chio/chio.c Wed Jun 2 09:34:41 2010 (r208730) @@ -1072,6 +1072,7 @@ find_element(char *voltag, uint16_t *et, /* Read in the changer slots */ if (cp.cp_nslots > 0) { + (void) memset(&cesr, 0, sizeof(cesr)); cesr.cesr_element_type = CHET_ST; cesr.cesr_element_base = 0; cesr.cesr_element_count = cp.cp_nslots; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: open->patched Important parts have been committed in r208730. Author: uqs Date: Fri Jul 30 12:36:40 2010 New Revision: 210643 URL: http://svn.freebsd.org/changeset/base/210643 Log: MFC r208730: Zero struct before reading from it PR: 140384 Modified: stable/8/bin/chio/chio.c Directory Properties: stable/8/bin/chio/ (props changed) Changes in other areas also in this revision: Modified: stable/7/bin/chio/chio.c Directory Properties: stable/7/bin/chio/ (props changed) Modified: stable/8/bin/chio/chio.c ============================================================================== --- stable/8/bin/chio/chio.c Fri Jul 30 12:04:29 2010 (r210642) +++ stable/8/bin/chio/chio.c Fri Jul 30 12:36:40 2010 (r210643) @@ -1072,6 +1072,7 @@ find_element(char *voltag, uint16_t *et, /* Read in the changer slots */ if (cp.cp_nslots > 0) { + (void) memset(&cesr, 0, sizeof(cesr)); cesr.cesr_element_type = CHET_ST; cesr.cesr_element_base = 0; cesr.cesr_element_count = cp.cp_nslots; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" Author: uqs Date: Fri Jul 30 12:36:40 2010 New Revision: 210643 URL: http://svn.freebsd.org/changeset/base/210643 Log: MFC r208730: Zero struct before reading from it PR: 140384 Modified: stable/7/bin/chio/chio.c Directory Properties: stable/7/bin/chio/ (props changed) Changes in other areas also in this revision: Modified: stable/8/bin/chio/chio.c Directory Properties: stable/8/bin/chio/ (props changed) Modified: stable/7/bin/chio/chio.c ============================================================================== --- stable/7/bin/chio/chio.c Fri Jul 30 12:04:29 2010 (r210642) +++ stable/7/bin/chio/chio.c Fri Jul 30 12:36:40 2010 (r210643) @@ -1072,6 +1072,7 @@ find_element(char *voltag, uint16_t *et, /* Read in the changer slots */ if (cp.cp_nslots > 0) { + (void) memset(&cesr, 0, sizeof(cesr)); cesr.cesr_element_type = CHET_ST; cesr.cesr_element_base = 0; cesr.cesr_element_count = cp.cp_nslots; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: patched->closed Merged to stable branches. |