Bug 532492
| Summary: | how about allowing memset(foo, 0, 0) without warning ? | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Caolan McNamara <caolanm> | ||||
| Component: | glibc | Assignee: | Andreas Schwab <schwab> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 12 | CC: | drepper, jakub, schwab | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | 2.11.1-1 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2009-11-25 03:19:57 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
I applied the patch upstream. This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping It's in rawhide. glibc-2.11-4 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/glibc-2.11-4 glibc-2.11.1-1 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 367159 [details] like so Description of problem: A memset where both arguments are 0 gets reported with "warning: memset used with constant zero length parameter; this could be due to transposed parameters" Version-Release number of selected component (if applicable): glibc-headers-2.10.90-25 How reproducible: 100% Steps to Reproduce: 1. gcc -O2 -Wall -D_FORTIFY_SOURCE=2 memset(c, 0, 0); Expected results: No biggy, but with some templated/macroized code there's some circumstances where memset ends up with both args equal to 0, e.g. memset (foo, 0, capacity()). Easy fix in client code too of course, but how about eliding the warning about a 0 len if the other arg is definitely 0