Hi Ed, Ed schreef op di 26-04-2011 om 16:44 [-0400]: > What is the solution to this error seen on Ubuntu with a fresh git > clone of harfbuzz? , trying to compile with gcc 4.4.5: > > The "set" function on line 47 is declared void but returns a value? > Looks very odd to me ... > > =============================== > In file included from hb-private.hh:298, > from hb-blob.cc:27: > hb-object-private.hh: In member function ‘void<anonymous struct>::set(int)’: > hb-object-private.hh:47: error: expected primary-expression before ‘do’ > hb-object-private.hh:47: error: return-statement with a value, in > function returning 'void' > hb-object-private.hh:47: error: expected ‘;’ before ‘do’ > ===============================
At a first glance, this looks a lot like the issue and patch reported
earlier today by Bradley Grainger. See the thread with the subject
"[PATCH] Implement threading primitives on Windows; fix compile error
and leak" for more info.
Anyway, Bradley's patch is the one pasted below. You might try it to see
if it fixes your problem:
diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh
index 0a055e9..d61751a 100644
--- a/src/hb-object-private.hh
+++ b/src/hb-object-private.hh
@@ -44,7 +44,7 @@ typedef struct {
inline void init (int v) { ref_count = v; /* non-atomic is fine */ }
inline int inc (void) { return hb_atomic_int_fetch_and_add
(ref_count, 1); }
inline int dec (void) { return hb_atomic_int_fetch_and_add
(ref_count, -1); }
- inline void set (int v) { return hb_atomic_int_set (ref_count, v); }
+ inline void set (int v) { hb_atomic_int_set (ref_count, v); }
HTH.
— Wouter
signature.asc
Description: This is a digitally signed message part
_______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
