• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
warning: initialization makes pointer from integer without a cast
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

warning: initialization makes pointer from integer without a cast


  • Subject: warning: initialization makes pointer from integer without a cast
  • From: Sandy Santra <email@hidden>
  • Date: Fri, 24 Apr 2009 16:43:49 -0400

That's the error, here's the code:

void PrintProcessInfo() {

NSString *processName = [[NSProcessInfo processInfo] processName];
NSString *processIdentifier = [[NSProcessInfo processInfo] processIdentifier]; //Line 2 (must be a better way!)
NSLog(@"Process Name: '%@'.", processName);
NSLog(@"Process ID: '%i'.", processIdentifier);
}

My output is fine:

2009-04-24 16:37:29.957 Test[31166:10b] Process Name: 'Test'.
2009-04-24 16:37:29.957 Test[31166:10b] Process ID: '31166'.

but I'm going nuts over this error (warning).  Any help appreciated.  I've just spent way too many hours trying to figure this out.  Documentation says the method for the ID is "- (int)processIdentifier" but I don't know how to work that into this code.  And I have a bad feeling about Line 2.

Thanks.

--Sandy Santra



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: warning: initialization makes pointer from integer without a cast
      • From: Shawn Erickson <email@hidden>
    • Re: warning: initialization makes pointer from integer without a cast
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Re: sdk 10.4 and 10.5
  • Next by Date: Re: warning: initialization makes pointer from integer without a cast
  • Previous by thread: [Updated] Subversion 1.5/1.6 and Xcode 3+ HOWTO
  • Next by thread: Re: warning: initialization makes pointer from integer without a cast
  • Index(es):
    • Date
    • Thread