Opened 11 years ago
Closed 10 years ago
#709 closed patch (fixed)
IZ3112: memset: wrong order of arguments
Reported by: | h_koenig | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | sge | Version: | 6.2u3 |
Severity: | minor | Keywords: | build |
Cc: |
Description
[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=3112]
Issue #: 3112 Platform: All Reporter: h_koenig (h_koenig) Component: gridengine OS: All Subcomponent: build Version: 6.2u3 CC: None defined Status: NEW Priority: P3 Resolution: Issue type: PATCH Target milestone: --- Assigned to: andreas (andreas) QA Contact: andreas URL: * Summary: memset: wrong order of arguments Status whiteboard: Attachments: Issue 3112 blocks: Votes for issue 3112: Opened: Fri Aug 21 08:59:00 -0700 2009 ------------------------ trying to build 6.2u3 on SUSE 9.0 64bit with gcc-4.3.2 I got the following error msg: ../daemons/common/admin_mail.c: In function 'job_related_adminmail': ../daemons/common/admin_mail.c:137: error: statement with no effect ../daemons/common/admin_mail.c: In function 'adm_mail_reset': ../daemons/common/admin_mail.c:336: error: statement with no effect pointing to calls of memset with wrong sequence of arguments. grepping for that argument pattern showed two more such errors. here is a patch which makes 6.2u3 compile for me[tm] : --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- Index: source/clients/qmon/qmon_qaction.c =================================================================== RCS file: /cvs/gridengine/source/clients/qmon/qmon_qaction.c,v retrieving revision 1.52 diff -u -r1.52 qmon_qaction.c --- source/clients/qmon/qmon_qaction.c 11 Feb 2009 10:35:52 -0000 1.52 +++ source/clients/qmon/qmon_qaction.c 21 Aug 2009 15:52:24 -0000 @@ -1615,7 +1615,7 @@ ) { DENTER(GUI_LAYER, "qmonInitQCEntry"); - memset((void*)data, sizeof(tQCEntry), 0); + memset((void*)data, 0, sizeof(tQCEntry)); DEXIT; Index: source/clients/qmon/qmon_cluster.c =================================================================== RCS file: /cvs/gridengine/source/clients/qmon/qmon_cluster.c,v retrieving revision 1.52 diff -u -r1.52 qmon_cluster.c --- source/clients/qmon/qmon_cluster.c 11 Feb 2009 10:35:50 -0000 1.52 +++ source/clients/qmon/qmon_cluster.c 21 Aug 2009 15:52:27 -0000 @@ -2336,7 +2336,7 @@ ) { DENTER(GUI_LAYER, "qmonInitCClEntry"); - memset((void*)clen, sizeof(tCClEntry), 0); + memset((void*)clen, 0, sizeof(tCClEntry)); DEXIT; } Index: source/daemons/common/admin_mail.c =================================================================== RCS file: /cvs/gridengine/source/daemons/common/admin_mail.c,v retrieving revision 1.21 diff -u -r1.21 admin_mail.c --- source/daemons/common/admin_mail.c 8 Oct 2007 14:15:53 -0000 1.21 +++ source/daemons/common/admin_mail.c 21 Aug 2009 15:52:30 -0000 @@ -134,7 +134,7 @@ DPRINTF(("sizeof(admail_times) : %d\n", sizeof(admail_times))); if (first) { - memset(admail_times, sizeof(admail_times), 0); + memset(admail_times, 0, sizeof(admail_times)); first = 0; } @@ -333,7 +333,7 @@ ** let 0 be a reset all */ if (!state) { - memset(admail_times, sizeof(admail_times), 0); + memset(admail_times, 0, sizeof(admail_times)); return 0; } --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
Change History (1)
comment:1 Changed 10 years ago by dlove
- Resolution set to fixed
- Severity set to minor
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Fixed by [3538].