Your message dated Sun, 25 Jan 2009 22:47:03 +0000
with message-id <[email protected]>
and subject line Bug#502581: fixed in cunit 2.1-0.dfsg-9
has caused the Debian Bug report #502581,
regarding Use "const char *" instead of "char *" to prevent warnings with g++
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
502581: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502581
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libcunit1
Version: 2.1-0.dfsg-8
Severity: important
Tags: patch

---------------- test.c-----------
#include <CUnit/CUnit.h>
void test()
{
        CU_ASSERT( 1 > 1 );
}
----------------------------------

gcc -c test.c  => no warnings
g++ -c test.c  => warning about converting static string to char*

Basically there are 3 warnings per CU_ASSERT* used. With large number
of tests, one ends up with huge number of warnings. This can hide
other important warnings.

The patch is very simple.  Changing "char[]" definition to "const
char[]" does the trick.

- Adam


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libcunit1 depends on:
ii  libc6                         2.7-15     GNU C Library: Shared libraries

libcunit1 recommends no packages.

libcunit1 suggests no packages.

-- no debconf information
diff -ru cunit-2.1-0.dfsg.old/CUnit/Headers/TestRun.h cunit-2.1-0.dfsg/CUnit/Headers/TestRun.h
--- cunit-2.1-0.dfsg.old/CUnit/Headers/TestRun.h	2006-01-29 21:48:26.000000000 -0600
+++ cunit-2.1-0.dfsg/CUnit/Headers/TestRun.h	2008-10-17 23:03:14.665086520 -0500
@@ -172,9 +172,9 @@
 /* Assertion implementation function. */
 CU_EXPORT CU_BOOL CU_assertImplementation(CU_BOOL bValue,
                                           unsigned int uiLine,
-                                          char strCondition[],
-                                          char strFile[],
-                                          char strFunction[],
+                                          const char strCondition[],
+                                          const char strFile[],
+                                          const char strFunction[],
                                           CU_BOOL bFatal);
 
 #ifdef USE_DEPRECATED_CUNIT_NAMES
diff -ru cunit-2.1-0.dfsg.old/CUnit/Sources/Framework/TestRun.c cunit-2.1-0.dfsg/CUnit/Sources/Framework/TestRun.c
--- cunit-2.1-0.dfsg.old/CUnit/Sources/Framework/TestRun.c	2006-01-29 21:52:34.000000000 -0600
+++ cunit-2.1-0.dfsg/CUnit/Sources/Framework/TestRun.c	2008-10-17 23:05:43.191046200 -0500
@@ -87,8 +87,8 @@
 static void         add_failure(CU_pFailureRecord* ppFailure,
                                 CU_pRunSummary pRunSummary,
                                 unsigned int uiLineNumber,
-                                char szCondition[],
-                                char szFileName[],
+                                const char szCondition[],
+                                const char szFileName[],
                                 CU_pSuite pSuite,
                                 CU_pTest pTest);
 
@@ -119,9 +119,9 @@
  */
 CU_BOOL CU_assertImplementation(CU_BOOL bValue, 
                                 unsigned int uiLine,
-                                char strCondition[], 
-                                char strFile[],
-                                char strFunction[], 
+                                const char strCondition[], 
+                                const char strFile[],
+                                const char strFunction[], 
                                 CU_BOOL bFatal)
 {
   /* not used in current implementation - stop compiler warning */
@@ -587,8 +587,8 @@
 void add_failure(CU_pFailureRecord* ppFailure,
                  CU_pRunSummary pRunSummary,
                  unsigned int uiLineNumber,
-                 char szCondition[],
-                 char szFileName[],
+                 const char szCondition[],
+                 const char szFileName[],
                  CU_pSuite pSuite,
                  CU_pTest pTest)
 {

--- End Message ---
--- Begin Message ---
Source: cunit
Source-Version: 2.1-0.dfsg-9

We believe that the bug you reported is fixed in the latest version of
cunit, which is due to be installed in the Debian FTP archive:

cunit_2.1-0.dfsg-9.diff.gz
  to pool/main/c/cunit/cunit_2.1-0.dfsg-9.diff.gz
cunit_2.1-0.dfsg-9.dsc
  to pool/main/c/cunit/cunit_2.1-0.dfsg-9.dsc
libcunit1-dev_2.1-0.dfsg-9_i386.deb
  to pool/main/c/cunit/libcunit1-dev_2.1-0.dfsg-9_i386.deb
libcunit1-doc_2.1-0.dfsg-9_all.deb
  to pool/main/c/cunit/libcunit1-doc_2.1-0.dfsg-9_all.deb
libcunit1-ncurses-dev_2.1-0.dfsg-9_i386.deb
  to pool/main/c/cunit/libcunit1-ncurses-dev_2.1-0.dfsg-9_i386.deb
libcunit1-ncurses_2.1-0.dfsg-9_i386.deb
  to pool/main/c/cunit/libcunit1-ncurses_2.1-0.dfsg-9_i386.deb
libcunit1_2.1-0.dfsg-9_i386.deb
  to pool/main/c/cunit/libcunit1_2.1-0.dfsg-9_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Philipp Benner <[email protected]> (supplier of updated cunit package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 25 Jan 2009 22:19:21 +0000
Source: cunit
Binary: libcunit1-dev libcunit1 libcunit1-ncurses-dev libcunit1-ncurses 
libcunit1-doc
Architecture: source all i386
Version: 2.1-0.dfsg-9
Distribution: unstable
Urgency: low
Maintainer: Philipp Benner <[email protected]>
Changed-By: Philipp Benner <[email protected]>
Description: 
 libcunit1  - Unit Testing Library for C
 libcunit1-dev - Unit Testing Library for C -- development files
 libcunit1-doc - Unit Testing Library for C -- documentation
 libcunit1-ncurses - Unit Testing Library for C (ncurses)
 libcunit1-ncurses-dev - Unit Testing Library for C (ncurses) -- development 
files
Closes: 502581
Changes: 
 cunit (2.1-0.dfsg-9) unstable; urgency=low
 .
   * Standards version 3.8.0.
   * Use "const char *" instead of "char *" to prevent warnings
     with g++ (Closes: #502581).
Checksums-Sha1: 
 b431ff37fd5337bfca3f590a3c6e8e445a806e30 1321 cunit_2.1-0.dfsg-9.dsc
 c8d1954bcc21cd1cd8d03b88a5114f98f805ab27 4942 cunit_2.1-0.dfsg-9.diff.gz
 73071373bb33cc26bfa3687944ab390a6b6ccc7c 112520 
libcunit1-doc_2.1-0.dfsg-9_all.deb
 e33f198fe5fae3e90e53b6a91cbc71f64d62b154 46560 
libcunit1-dev_2.1-0.dfsg-9_i386.deb
 7c56c88db36161f8da41176b0f16025ec4d230ce 25122 libcunit1_2.1-0.dfsg-9_i386.deb
 bed9823f6c1ef7ecdbf2749709e66c2b3cc3e5cc 48218 
libcunit1-ncurses-dev_2.1-0.dfsg-9_i386.deb
 5e05b7871995183e9bace725956cceb4c4041ec7 29840 
libcunit1-ncurses_2.1-0.dfsg-9_i386.deb
Checksums-Sha256: 
 aeb9ee71baf00257d4f0304841cf065b1cf846b2ea6be0f985220693627282e1 1321 
cunit_2.1-0.dfsg-9.dsc
 285c3582cb70e14abac5756a046eaf387fe0853872b34b78e315408918329942 4942 
cunit_2.1-0.dfsg-9.diff.gz
 16f3d6d5e0b5d2fe40627778a8f648421ca5f6bb4a81451056b07bf9b7e08487 112520 
libcunit1-doc_2.1-0.dfsg-9_all.deb
 aca39f42d8bf06b1ff7903168968cd3e57696653d7306f5aaa7b4033937e3456 46560 
libcunit1-dev_2.1-0.dfsg-9_i386.deb
 3efd8d319300f6dd260e243d1284b286556c34aa894768b10779696ef75b7a71 25122 
libcunit1_2.1-0.dfsg-9_i386.deb
 3bbd0c7c7895d6d76a766630422b4dd107e48bb65ba95d681af41cefe0af725c 48218 
libcunit1-ncurses-dev_2.1-0.dfsg-9_i386.deb
 611ea0b3af9dd0306595be0ca8a74774ee11d6d6bebc6cfa43aeff44e954418d 29840 
libcunit1-ncurses_2.1-0.dfsg-9_i386.deb
Files: 
 041786c4206f37d3f05dfab1d32dd22c 1321 libs optional cunit_2.1-0.dfsg-9.dsc
 59b1e98afdc7cdcbd3c6fe5091663d0f 4942 libs optional cunit_2.1-0.dfsg-9.diff.gz
 1e8f61042fdd7d60b5ab3ac9332a0e62 112520 doc optional 
libcunit1-doc_2.1-0.dfsg-9_all.deb
 18812930ce54df2a3809da6d6639c032 46560 libdevel optional 
libcunit1-dev_2.1-0.dfsg-9_i386.deb
 18db377229dc47920b88b14003444c93 25122 libs optional 
libcunit1_2.1-0.dfsg-9_i386.deb
 70cccf3e756ea647ba91f7b0535adf52 48218 libdevel optional 
libcunit1-ncurses-dev_2.1-0.dfsg-9_i386.deb
 b62097a92f1daece66bae8a52539e7a9 29840 libs optional 
libcunit1-ncurses_2.1-0.dfsg-9_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkl85/MACgkQqVw77OuI6TB/KACfXb6iuwro0/1mgB6adGyRfqav
tFAAoIkZLlSUAtZj3eHwxYEgEAv3nNA/
=KhCd
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to