Get the CPU architecture of the local m/c

  • Hi

    I am trying to get the CPU architecture of the local m/c using

    #import <mach-o/arch.h>

    NXArchInfo *info = NXGetLocalArchInfo();

    But I am getting a warning which says "initialization discards qualifiers from pointer target type". What does this mean?

          Now you can chat without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php
  • On 9/26/07, deepak gopal <deengg...> wrote:
    > Hi
    >
    > I am trying to get the CPU architecture of the local m/c using
    >
    > #import <mach-o/arch.h>
    >
    > NXArchInfo *info = NXGetLocalArchInfo();
    >
    > But I am getting a warning which says "initialization discards qualifiers from pointer target type". What does this mean?

    It means that you're ignoring the "qualifiers" (such as const or
    volatile) on the returned pointer. Looking at the definition of
    NXGetLocalArchInfo, it is the "const" qualifier that you're ignoring.

    Try this:

    const NXArchInfo *info = NXGetLocalArchInfo();

    >
    >
    >
    >
    > Now you can chat without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php
    >

    --
    Clark S. Cox III
    <clarkcox3...>
  • On Sep 26, 2007, at 2:04 PM, deepak gopal wrote:

    > Hi
    >
    > I am trying to get the CPU architecture of the local m/c using
    >
    > #import <mach-o/arch.h>
    >
    > NXArchInfo *info = NXGetLocalArchInfo();
    >
    > But I am getting a warning which says "initialization discards
    > qualifiers from pointer target type". What does this mean?

    Probably that the routine in question returns a const NXArchInfo
    pointer.  Try:

    const NXArchInfo *info = NXGetLocalArchInfo().
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today