Etoile compile errors

View: New views
4 Messages — Rating Filter:   Alert me  

Etoile compile errors

by Bugzilla from michael.thaler@physik.tu-muenchen.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I tried to install Etoile from trunk. For some reasons all warnings are turned
into errors (I don't know enough of this to turn that off, how can you do
that?). I got a couple of compile errors (uninitialized variables). I fixed
them by assigning inital values, but I am new to gnustep/etoile and I don't
know if this is the right thing to do. Here are the diffs:

Index: ADImageView.m
===================================================================
--- ADImageView.m       (revision 5268)
+++ ADImageView.m       (working copy)
@@ -177,7 +177,7 @@

 - (void) setPerson: (ADPerson*) person
 {
-  NSString *imgPath;
+  NSString *imgPath = @"";

   if(person == _person)
     return;

Index: ADSinglePropertyView.m
===================================================================
--- ADSinglePropertyView.m      (revision 5268)
+++ ADSinglePropertyView.m      (working copy)
@@ -321,7 +321,7 @@
 - (void) autoselectAccordingToMode: (ADAutoselectMode) mode
 {
   int i;
-  ADPerson *p;
+  ADPerson *p = nil;

   [_peopleTable reloadData];
   switch(mode)

Index: LCMultiReader.m
===================================================================
--- LCMultiReader.m     (revision 5268)
+++ LCMultiReader.m     (working copy)
@@ -489,7 +489,7 @@
 {
     if (term == nil) return nil;
     /* LuceneKit implementation */
-    id <LCTermDocuments> result;
+    id <LCTermDocuments> result = nil;
     if (i >= [readerTermDocs count]) // Not Exist
     {

Index: IKCompositorOperation.m
===================================================================
--- IKCompositorOperation.m     (revision 5268)
+++ IKCompositorOperation.m     (working copy)
@@ -46,7 +46,7 @@
        rectangle = [propertyList objectForKey: @"rectangle"];
        if (rectangle != nil)
        {
-               float x, y, width, height;
+               float x = 0, y = 0, width = 0, height = 0;

                number = [rectangle objectForKey: @"x"];
                if (number != nil) x = [number floatValue];

Index: IKCompositor.m
===================================================================
--- IKCompositor.m      (revision 5268)
+++ IKCompositor.m      (working copy)
@@ -83,7 +83,7 @@

        if (dict != nil)
        {
-               float width, height;
+               float width = 0, height = 0;

                number = [dict objectForKey: @"width"];
                if (number != nil) width = [number floatValue];
@@ -101,7 +101,7 @@

                if (dict != nil)
                {
-                       float width, height;
+                       float width = 0, height = 0;

                        number = [dict objectForKey: @"width"];
                        if (number != nil) width = [number floatValue];

Index: NSFileManager+IconKit.m
===================================================================
--- NSFileManager+IconKit.m     (revision 5268)
+++ NSFileManager+IconKit.m     (working copy)
@@ -23,7 +23,7 @@
   NSString *pathToCheck = [NSString string];
   int i;
   int cCount = [components count];
-  BOOL result;
+  BOOL result = NO;

   for (i = 0; i < cCount; i++)
     {

Index: LKMessageSend.m
===================================================================
--- LKMessageSend.m     (revision 5268)
+++ LKMessageSend.m     (working copy)
@@ -217,7 +217,7 @@
 - (void*) compileWithGenerator: (id<LKCodeGenerator>)aGenerator
 {
        id target = [receiver compileWithGenerator: aGenerator];
-       id result;
+       id result = nil;
        FOREACH(messages, message, LKMessageSend*)
        {
                result = [message compileWithGenerator: aGenerator
forTarget:target];

Index: NSTabView.m
===================================================================
--- NSTabView.m (revision 5268)
+++ NSTabView.m (working copy)
@@ -10,8 +10,8 @@
 {
   NSGraphicsContext     *ctxt = GSCurrentContext();
   int                  howMany = [_items count];
-  int                  i;
-  NSRect               previousRect;
+  int                  i = 0;
+  NSRect               previousRect = NSMakeRect(0, 0, 0, 0);
   int                  previousState = 0;
   NSRect               aRect = _bounds;

Index: NSButtonCell.m
===================================================================
--- NSButtonCell.m      (revision 5268)
+++ NSButtonCell.m      (working copy)
@@ -68,9 +68,9 @@
 {
   unsigned     mask;
   NSImage      *imageToDisplay;
-  NSRect       imageRect;
+  NSRect       imageRect = NSMakeRect(0, 0, 0, 0);
   NSAttributedString   *titleToDisplay;
-  NSRect       titleRect;
+  NSRect       titleRect = NSMakeRect(0, 0, 0, 0);
   NSSize       imageSize = {0, 0};
   NSSize        titleSize = {0, 0};
 //  NSColor    *backgroundColor = nil;

In addition, libmp4v2-dev in Debian only contains a header called mp4v2.h (not
mp4.h) so I changed that:

Index: MKMediaFile.m
===================================================================
--- MKMediaFile.m       (revision 5268)
+++ MKMediaFile.m       (working copy)
@@ -4,7 +4,7 @@
 // Ugly hack to prevent tag_c.h from redefining BOOL
 #define BOOL BOOL
 #include <tag_c.h>
-#include <mp4.h>
+#include <mp4v2/mp4v2.h

There are also a couple of errors that MP4_GET_STRING, MP4GetMetadataYear and
MP4GetMetadataTrack in this file.

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

Re: Etoile compile errors

by Quentin Mathé-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

Le 3 sept. 2009 à 21:54, Michael Thaler a écrit :

> I tried to install Etoile from trunk. For some reasons all warnings  
> are turned
> into errors (I don't know enough of this to turn that off, how can  
> you do
> that?).

You can remove the -Werror flag at the end of etoile.make.
Some modules in the repository might still enforce it by themselves  
though, although they shouldn't.

> I got a couple of compile errors (uninitialized variables). I fixed
> them by assigning inital values, but I am new to gnustep/etoile and  
> I don't
> know if this is the right thing to do. Here are the diffs:

Looks like the right thing to do. Thanks for the patch, I'll apply it.

> In addition, libmp4v2-dev in Debian only contains a header called  
> mp4v2.h (not
> mp4.h) so I changed that:
>
> Index: MKMediaFile.m
> ===================================================================
> --- MKMediaFile.m       (revision 5268)
> +++ MKMediaFile.m       (working copy)
> @@ -4,7 +4,7 @@
> // Ugly hack to prevent tag_c.h from redefining BOOL
> #define BOOL BOOL
> #include <tag_c.h>
> -#include <mp4.h>
> +#include <mp4v2/mp4v2.h
>
> There are also a couple of errors that MP4_GET_STRING,  
> MP4GetMetadataYear and
> MP4GetMetadataTrack in this file.

For this one, Eric can probably reply better than I can.

Cheers,
Quentin.


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

Re: Etoile compile errors

by Quentin Mathé-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le 3 sept. 2009 à 21:54, Michael Thaler a écrit :

> I tried to install Etoile from trunk. For some reasons all warnings  
> are turned
> into errors (I don't know enough of this to turn that off, how can  
> you do
> that?). I got a couple of compile errors (uninitialized variables).

Applied with r5270 (except the MediaKit portion).

If you submit another patch later, it would be better to generate a  
single diff against the whole trunk and send it in attachement, it's  
easier to apply.

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

Re: Etoile compile errors

by Niels Grewe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Sep 03, 2009 at 09:54:48PM +0200, Michael Thaler wrote:

> In addition, libmp4v2-dev in Debian only contains a header called mp4v2.h (not
> mp4.h) so I changed that:
>
> Index: MKMediaFile.m
> ===================================================================
> --- MKMediaFile.m       (revision 5268)
> +++ MKMediaFile.m       (working copy)
> @@ -4,7 +4,7 @@
>  // Ugly hack to prevent tag_c.h from redefining BOOL
>  #define BOOL BOOL
>  #include <tag_c.h>
> -#include <mp4.h>
> +#include <mp4v2/mp4v2.h
>
> There are also a couple of errors that MP4_GET_STRING, MP4GetMetadataYear and
> MP4GetMetadataTrack in this file.

Might those errors be deprecation warnings? I provided a patch for that
a few months back (when the functionality in question was still part of
Melodie). That patch might perhaps still be relevant for your situation.
The main problem still is that different versions of libmp4v2 use
different umbrella headers (mp4.h in some older versions and
mp4v2/mp4v2.h in the newer ones). Supporting them both seems to be
tricky. I didn't investigate further, since (IIRC) Eric was positive
about dropping libmp4v2 in favour of taglib at some point.

Cheers,


Niels

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