Hi,

Is anybody else using GCC 4.4? I had to do the following changes to
make Étoilé compile today.

Most of the errors are because of possibly uninitialized variables.
The code is probably not finished here, though, because in all three
places below, the variables actually never get set.

There is also one I did not include in the diff; ETUUID uses an
uninitialized variable on purpose to generate a random seed (as a
fallback in case /dev/random does not work). GCC 4.4 does not like
that.

The stdio.h in CodeGen is because the LOG macro uses fprintf and stderr.

Cheers,
Truls

UKPluginsRegistry.m Languages/LanguageKit/CodeGen/CodeGenModule.h
Index: Frameworks/IconKit/Source/IKApplicationIconProvider.m
===================================================================
--- Frameworks/IconKit/Source/IKApplicationIconProvider.m       (revision 4747)
+++ Frameworks/IconKit/Source/IKApplicationIconProvider.m       (working copy)
@@ -253,7 +253,7 @@
   NSString *path;
   NSString *subpath;
   NSString *pathComponent = [_path md5Hash];
-  BOOL result;
+  BOOL result = NO;

   pathComponent = [pathComponent stringByAppendingPathExtension: @"tiff"];

Index: Frameworks/IconKit/Source/IKThumbnailProvider.m
===================================================================
--- Frameworks/IconKit/Source/IKThumbnailProvider.m     (revision 4747)
+++ Frameworks/IconKit/Source/IKThumbnailProvider.m     (working copy)
@@ -170,7 +170,7 @@
   NSString *subpath;
   NSString *pathComponent = [url absoluteString];
   NSString *pathComponentHash = [pathComponent md5Hash];
-  BOOL result;
+  BOOL result = NO;

   path = [self _thumbnailsPath];
   subpath = [path stringByAppendingPathComponent: @"large"];
Index: Frameworks/EtoileFoundation/Source/UKPluginsRegistry.m
===================================================================
--- Frameworks/EtoileFoundation/Source/UKPluginsRegistry.m      (revision 4747)
+++ Frameworks/EtoileFoundation/Source/UKPluginsRegistry.m      (working copy)
@@ -258,7 +258,7 @@
        {
                NSBundle *bundle = [NSBundle bundleWithPath: path];
         NSString *identifier;
-        id image;
+        id image = [NSNull null];
                NSString *name;

         /* We retrieve plugin's name */
Index: Languages/LanguageKit/CodeGen/CodeGenModule.h
===================================================================
--- Languages/LanguageKit/CodeGen/CodeGenModule.h       (revision 4747)
+++ Languages/LanguageKit/CodeGen/CodeGenModule.h       (working copy)
@@ -1,6 +1,7 @@
 #ifndef __CODE_GEN_MODULE__INCLUDED__
 #define __CODE_GEN_MODULE__INCLUDED__
 #include "CGObjCRuntime.h"
+#include <stdio.h>

 namespace llvm {
   class BasicBlock;

_______________________________________________
Etoile-dev mailing list
Etoile-dev@gna.org
https://mail.gna.org/listinfo/etoile-dev

Reply via email to