mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

54 lines
1.8 KiB

Hotfix needed for new binutils (bug is in gcc)
(see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625)
--- ./content/html/style/src/nsROCSSPrimitiveValue.h.orig 2004-08-13 11:50:44.000000000 +0200
+++ ./content/html/style/src/nsROCSSPrimitiveValue.h 2004-08-13 11:57:20.000000000 +0200
@@ -191,27 +191,37 @@
void Reset(void)
{
- switch (mType) {
- case CSS_IDENT:
+ // --- see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625 ---
+ //
+ // we can't make a switch statement here because the compiler will create a
+ // jump-table in .ro_data for it and cause a link error such as:
+ //
+ // # .L1035' referenced in section `.rodata' of
+ // # ../../dist/lib/libgkconhtmlstyle_s.a(nsROCSSPrimitiveValue.o): defined in
+ // # discarded section `.gnu.linkonce.t._ZN21nsROCSSPrimitiveValue5ResetEv' of
+ // # ../../dist/lib/libgkconhtmlstyle_s.a(nsROCSSPrimitiveValue.o)
+ //
+ // - clifford (2004-08-13)
+ //
+ if (mType == CSS_IDENT) {
NS_ASSERTION(mValue.mAtom, "Null atom should never happen");
NS_RELEASE(mValue.mAtom);
- break;
- case CSS_STRING:
+ }
+ if (mType == CSS_STRING) {
NS_ASSERTION(mValue.mString, "Null string should never happen");
nsMemory::Free(mValue.mString);
mValue.mString = nsnull;
- break;
- case CSS_URI:
+ }
+ if (mType == CSS_URI) {
NS_IF_RELEASE(mValue.mURI);
- break;
- case CSS_RECT:
+ }
+ if (mType == CSS_RECT) {
NS_ASSERTION(mValue.mRect, "Null Rect should never happen");
NS_RELEASE(mValue.mRect);
- break;
- case CSS_RGBCOLOR:
+ }
+ if (mType == CSS_RGBCOLOR) {
NS_ASSERTION(mValue.mColor, "Null RGBColor should never happen");
NS_RELEASE(mValue.mColor);
- break;
}
}