]> granicus.if.org Git - p11-kit/commitdiff
Fix build with clang
authorStef Walter <stefw@collabora.co.uk>
Thu, 27 Oct 2011 18:32:40 +0000 (20:32 +0200)
committerStef Walter <stefw@collabora.co.uk>
Thu, 27 Oct 2011 18:32:40 +0000 (20:32 +0200)
 * Just removed some unused functions that used GNUC extensions

tests/cutest/CuTest.c
tests/cutest/CuTest.h

index dc7ebd9236f2157f975095d993813ad0bac7f854..b033483b1850424d170cd0b6369a184111890d1e 100644 (file)
@@ -211,16 +211,6 @@ void CuAssertIntEquals_LineMsg(CuTest* tc, const char* file, int line, const cha
        CuFail_Line(tc, file, line, message, buf);
 }
 
-void CuAssertDblEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message,
-       double expected, double actual, double delta)
-{
-       char buf[STRING_MAX];
-       if (fabs(expected - actual) <= delta) return;
-       sprintf(buf, "expected <%f> but was <%f>", expected, actual);
-
-       CuFail_Line(tc, file, line, message, buf);
-}
-
 void CuAssertPtrEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message,
        void* expected, void* actual)
 {
index 6246eeea7a2f840e994e040e5dc031112c61b0d3..b82d05bb8c624f18e83578716cc66c4f9f028a4a 100644 (file)
@@ -64,9 +64,6 @@ void CuAssertStrEquals_LineMsg(CuTest* tc,
 void CuAssertIntEquals_LineMsg(CuTest* tc,
        const char* file, int line, const char* message,
        int expected, int actual);
-void CuAssertDblEquals_LineMsg(CuTest* tc,
-       const char* file, int line, const char* message,
-       double expected, double actual, double delta);
 void CuAssertPtrEquals_LineMsg(CuTest* tc,
        const char* file, int line, const char* message,
        void* expected, void* actual);
@@ -81,8 +78,6 @@ void CuAssertPtrEquals_LineMsg(CuTest* tc,
 #define CuAssertStrEquals_Msg(tc,ms,ex,ac)    CuAssertStrEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))
 #define CuAssertIntEquals(tc,ex,ac)           CuAssertIntEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))
 #define CuAssertIntEquals_Msg(tc,ms,ex,ac)    CuAssertIntEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))
-#define CuAssertDblEquals(tc,ex,ac,dl)        CuAssertDblEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac),(dl))
-#define CuAssertDblEquals_Msg(tc,ms,ex,ac,dl) CuAssertDblEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac),(dl))
 #define CuAssertPtrEquals(tc,ex,ac)           CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))
 #define CuAssertPtrEquals_Msg(tc,ms,ex,ac)    CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))