[PATCH 01/10] Replace 'pointer' type with 'void *'

Eric Anholt eric at anholt.net
Sun Dec 29 00:32:03 PST 2013


Keith Packard <keithp at keithp.com> writes:

> This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
> is used throughout the X server for other things, and having duplicate
> names generates compiler warnings.

Review to follow.  I definitely don't want to read a v2.  But a v2 ready
to push could probably use a spot-check on the diff looking for "\+.*
/\*.*void \*" (or for * instead of /*), "\+.*pointer=", and "\+.*void
\*/\*" to catch some of the common failure patterns I missed.

Also, I suspect a built tree with stripped binaries should be the same
before and after, and would have caught a few of the code bugs present.

With all of these changes, this patch is:

Reviewed-by: Eric Anholt <eric at anholt.net>

> diff --git a/Xext/hashtable.h b/Xext/hashtable.h
> index 8a65732..780d5d2 100644
> --- a/Xext/hashtable.h
> +++ b/Xext/hashtable.h
> @@ -55,27 +55,27 @@ extern _X_EXPORT HashTable ht_create(int             keySize,
>                                       int             dataSize,
>                                       HashFunc        hash,
>                                       HashCompareFunc compare,
> -                                     pointer         cdata);
> +                                     void            *cdata);
>  /** @brief  HtDestruct deinitializes the structure. It does not free the
>              memory allocated to HashTableRec
>  */
>  extern _X_EXPORT void ht_destroy(HashTable ht);
>  
>  /** @brief  Adds a new key to the hash table. The key will be copied
> -            and a pointer to the value will be returned. The data will
> +            and a void *to the value will be returned. The data will
>              be initialized with zeroes.
>  
>    @param[in/out] ht  The hash table
>    @param[key] key    The key. The contents of the key will be copied.
>  
> -  @return On error NULL is returned, otherwise a pointer to the data
> +  @return On error NULL is returned, otherwise a void *to the data
>            associated with the newly inserted key.
>  
> -  @note  If dataSize is 0, a pointer to the end of the key may be returned
> +  @note  If dataSize is 0, a void *to the end of the key may be returned
>           to avoid returning NULL. Obviously the data pointed cannot be
>           modified, as implied by dataSize being 0.

I don't think these comments wanted to change.

> diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
> index 6f8939f..1494ec4 100644
> --- a/Xext/panoramiX.c
> +++ b/Xext/panoramiX.c
> @@ -130,7 +130,7 @@ static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr);
>  static void XineramaChangeGC(GCPtr, unsigned long);
>  static void XineramaCopyGC(GCPtr, unsigned long, GCPtr);
>  static void XineramaDestroyGC(GCPtr);
> -static void XineramaChangeClip(GCPtr, int, pointer, int);
> +static void XineramaChangeClip(GCPtr, int, void *, int);
>  static void XineramaDestroyClip(GCPtr);
>  static void XineramaCopyClip(GCPtr, GCPtr);
>  
> @@ -160,7 +160,7 @@ XineramaCloseScreen(ScreenPtr pScreen)
>      if (pScreen->myNum == 0)
>          RegionUninit(&PanoramiXScreenRegion);
>  
> -    free((pointer) pScreenPriv);
> +    free((void *) pScreenPriv);

Casting to void * to pass to a function taking void *?  I guess cleanups
of that can be left to a coccinelle patch later.

> diff --git a/Xext/saver.c b/Xext/saver.c
> index e06f408..03f28bb 100644
> --- a/Xext/saver.c
> +++ b/Xext/saver.c
> @@ -107,7 +107,7 @@ typedef struct _ScreenSaverSuspension {
>      int count;
>  } ScreenSaverSuspensionRec;
>  
> -static int ScreenSaverFreeSuspend(pointer /*value */ ,
> +static int ScreenSaverFreeSuspend(void */*value */ ,

space got lost.  But these protos are hideous anyway.

> @@ -168,7 +168,7 @@ typedef struct _ScreenSaverAttr {
>      unsigned long *values;
>  } ScreenSaverAttrRec, *ScreenSaverAttrPtr;
>  
> -static int ScreenSaverFreeAttr(pointer /* value */ ,
> +static int ScreenSaverFreeAttr(void */* value */ ,
>                                 XID      /* id */
>      );

same

> diff --git a/Xext/shm.c b/Xext/shm.c
> index 1957a95..34545ec 100644
> --- a/Xext/shm.c
> +++ b/Xext/shm.c
> @@ -99,7 +99,7 @@ typedef struct _ShmScrPrivateRec {
>  } ShmScrPrivateRec;
>  
>  static PixmapPtr fbShmCreatePixmap(XSHM_CREATE_PIXMAP_ARGS);
> -static int ShmDetachSegment(pointer /* value */ ,
> +static int ShmDetachSegment(void */* value */ ,

lost space

> diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
> index e9c7e93..5453cbb 100644
> --- a/Xext/xselinux_hooks.c
> +++ b/Xext/xselinux_hooks.c
> @@ -74,10 +74,10 @@ static Atom atom_client_ctx;
>  static security_id_t unlabeled_sid;
>  
>  /* forward declarations */
> -static void SELinuxScreen(CallbackListPtr *, pointer, pointer);
> +static void SELinuxScreen(CallbackListPtr *, void *, void *);
>  
> -/* "true" pointer value for use as callback data */
> -static pointer truep = (pointer) 1;
> +/* "true" void *value for use as callback data */

unintentional comment change.

> diff --git a/Xi/chgptr.c b/Xi/chgptr.c
> index f99d1aa..aaebc9f 100644
> --- a/Xi/chgptr.c
> +++ b/Xi/chgptr.c
> @@ -46,7 +46,7 @@ SOFTWARE.
>  
>  /***********************************************************************
>   *
> - * Extension function to change the pointer device.
> + * Extension function to change the void *device.

bad comment change.

> diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c
> index cde5351..46b795b 100644
> --- a/Xi/gtmotion.c
> +++ b/Xi/gtmotion.c
> @@ -81,7 +81,7 @@ SProcXGetDeviceMotionEvents(ClientPtr client)
>  
>  /****************************************************************************
>   *
> - * Get the motion history for an extension pointer devices.
> + * Get the motion history for an extension void *devices.
>   *
>   */
>  

bad comment change.

> diff --git a/Xi/listdev.c b/Xi/listdev.c
> index 470fb52..a30072e 100644
> --- a/Xi/listdev.c
> +++ b/Xi/listdev.c
> @@ -308,7 +308,7 @@ static Bool
>  ShouldSkipDevice(ClientPtr client, DeviceIntPtr d)
>  {
>      /* don't send master devices other than VCP/VCK */
> -    if (!IsMaster(d) || d == inputInfo.pointer ||d == inputInfo.keyboard) {
> +    if (!IsMaster(d) || d == inputInfo.pointer||d == inputInfo.keyboard) {
>          int rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess);
>  
>          if (rc == Success)

bad whitespace change.

> diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c
> index 3f051f7..0ce2676 100644
> --- a/Xi/xiwarppointer.c
> +++ b/Xi/xiwarppointer.c
> @@ -25,7 +25,7 @@
>  
>  /***********************************************************************
>   *
> - * Request to Warp the pointer location of an extension input device.
> + * Request to Warp the void *location of an extension input device.
>   *
>   */

bad comment change.

> diff --git a/dix/devices.c b/dix/devices.c
> index 3aecd1b..9f526f4 100644
> --- a/dix/devices.c
> +++ b/dix/devices.c
> @@ -152,7 +152,7 @@ DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
>              return BadValue;
>  
>          /* Don't allow disabling of VCP/VCK or XTest devices */
> -        if ((dev == inputInfo.pointer ||
> +        if ((dev == inputInfo.pointer||
>               dev == inputInfo.keyboard ||
>               IsXTestDevice(dev, NULL))
>              &&!(*(CARD8 *) prop->data))

bad whitespace

> @@ -386,7 +386,7 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
>          }
>          else {
>              if (dev->coreEvents)
> -                other = (IsPointerDevice(dev)) ? inputInfo.pointer :
> +                other = (IsPointerDevice(dev)) ? inputInfo.pointer:
>                      inputInfo.keyboard;
>              else
>                  other = NULL;   /* auto-float non-core devices */

bad whitespace

> @@ -1049,7 +1049,7 @@ CloseDownDevices(void)
>      inputInfo.devices = NULL;
>      inputInfo.off_devices = NULL;
>      inputInfo.keyboard = NULL;
> -    inputInfo.pointer = NULL;
> +    inputInfo.pointer= NULL;
>  
>      XkbDeleteRulesDflts();
>      XkbDeleteRulesUsed();

bad whitespace.
w
> @@ -2721,7 +2721,7 @@ GetMaster(DeviceIntPtr dev, int which)
>  }
>  
>  /**
> - * Create a new device pair (== one pointer, one keyboard device).
> + * Create a new device pair (== one pointer , one keyboard device).
>   * Only allocates the devices, you will need to call ActivateDevice() and
>   * EnableDevice() manually.
>   * Either a master or a slave device can be created depending on

bad comment

> @@ -2741,7 +2741,7 @@ AllocDevicePair(ClientPtr client, const char *name,
>  
>      XkbInitPrivates();
>  
> -    pointer = AddInputDevice(client, ptr_proc, TRUE);
> +    pointer= AddInputDevice(client, ptr_proc, TRUE);
>  
>      if (!pointer)
>          return BadAlloc;

bad whitespace

> diff --git a/dix/dixfonts.c b/dix/dixfonts.c
> index 57177ac..77cd696 100644
> --- a/dix/dixfonts.c
> +++ b/dix/dixfonts.c

> @@ -1118,12 +1118,12 @@ doPolyText(ClientPtr client, PTclosurePtr c)
>  
>      if (client->clientGone) {
>          fpe = c->pGC->font->fpe;
> -        (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
> +        (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
>  
>          if (ClientIsAsleep(client)) {
>              /* Client has died, but we cannot bail out right now.  We
>                 need to clean up after the work we did when going to
> -               sleep.  Setting the drawable pointer to 0 makes this
> +               sleep.  Setting the drawable void *to 0 makes this
>                 happen without any attempts to render or perform other
>                 unnecessary activities.  */
>              c->pDraw = (DrawablePtr) 0;

bad comment

> @@ -1337,7 +1337,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
>              ValidateGC(c->pDraw, origGC);
>          }
>  
> -        /* restore pElt pointer for execution of remainder of the request */
> +        /* restore pElt void *for execution of remainder of the request */
>          c->pElt = c->data;
>          return TRUE;
>      }

bad comment

> diff --git a/dix/dixutils.c b/dix/dixutils.c
> index c250bb1..220040f 100644
> --- a/dix/dixutils.c
> +++ b/dix/dixutils.c

> @@ -557,8 +557,8 @@ ProcessWorkQueueZombies(void)
>  
>  Bool
>  QueueWorkProc(Bool (*function)
> -              (ClientPtr /* pClient */ , pointer /* closure */ ),
> -              ClientPtr client, pointer closure)
> +              (ClientPtr /* pClient */ , void */* closure */ ),
> +              ClientPtr client, void *closure)
>  {
>      WorkQueuePtr q;
>  

space loss

> diff --git a/dix/events.c b/dix/events.c
> index 67bfac2..d4a4f4b 100644
> --- a/dix/events.c
> +++ b/dix/events.c

> @@ -5323,7 +5323,7 @@ InitEvents(void)
>      inputInfo.devices = (DeviceIntPtr) NULL;
>      inputInfo.off_devices = (DeviceIntPtr) NULL;
>      inputInfo.keyboard = (DeviceIntPtr) NULL;
> -    inputInfo.pointer = (DeviceIntPtr) NULL;
> +    inputInfo.pointer= (DeviceIntPtr) NULL;
>  
>      for (i = 0; i < MAXDEVICES; i++) {
>          DeviceIntRec dummy;

bad whitespace

> diff --git a/dix/privates.c b/dix/privates.c
> index 41b1a76..a285a44 100644
> --- a/dix/privates.c
> +++ b/dix/privates.c

> @@ -348,7 +348,7 @@ dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size)
>      if (size == 0)
>          bytes = sizeof(void *);
>  
> -    /* align to void * size */
> +    /* align to pointer  size */
>      bytes = (bytes + sizeof(void *) - 1) & ~(sizeof(void *) - 1);
>  
>      /* Update offsets for all affected keys */

Ahahah, a pointer <-> void change going the other direction.  I
approve, though.

> diff --git a/glx/indirect_util.c b/glx/indirect_util.c
> index f9d1243..b4addc1 100644
> --- a/glx/indirect_util.c
> +++ b/glx/indirect_util.c
> @@ -225,7 +225,7 @@ get_decode_index(const struct __glXDispatchInfo *dispatch_info, unsigned opcode)
>          /* If the next node is an empty leaf, the opcode is for a non-existant
>           * function.  We're done.
>           *
> -         * If the next node is a non-empty leaf, look up the function pointer
> +         * If the next node is a non-empty leaf, look up the function pointer 
>           * and return it.
>           */
>  

bad whitespace

> diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c
> index 70f2bc4..ec1d158 100644
> --- a/hw/dmx/dmxcursor.c
> +++ b/hw/dmx/dmxcursor.c
> @@ -90,7 +90,7 @@
>  #include "globals.h"
>  #include "cursorstr.h"
>  #include "dixevents.h"          /* For GetSpriteCursor() */
> -#include "inputstr.h"           /* for inputInfo.pointer */
> +#include "inputstr.h"           /* for inputInfo.pointer*/
>  
>  #if DMX_CURSOR_DEBUG
>  #define DMXDBG0(f)               dmxLog(dmxDebug,f)

bad comment

> diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
> index 7adcba0..f628c00 100644
> --- a/hw/dmx/dmxinit.c
> +++ b/hw/dmx/dmxinit.c
> @@ -919,7 +919,7 @@ OsVendorInit(void)
>  }
>  
>  /** This function is called in Xserver/os/utils.c from \a FatalError()
> - * and \a VFatalError().  (Note that setting the function pointer \a
> + * and \a VFatalError().  (Note that setting the function pointer\a
>   * OsVendorVErrorFProc will cause \a VErrorF() (which is called by the
>   * two routines mentioned here, as well as by others) to use the
>   * referenced routine instead of \a vfprintf().) */

bad comment

> diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
> index e06fc87..afab2d2 100644
> --- a/hw/dmx/input/dmxinputinit.c
> +++ b/hw/dmx/input/dmxinputinit.c

> @@ -741,7 +741,7 @@ dmxAddDevice(DMXLocalInputInfoPtr dmxLocal)
>          if (dmxLocal->type == DMX_LOCAL_MOUSE && !dmxLocalCorePointer) {
>              dmxLocal->isCore = 1;
>              dmxLocalCorePointer = dmxLocal;
> -            name = "pointer";
> +            name = "pointer ";
>          }
>      }
>  

bad code change!

> @@ -850,7 +850,7 @@ dmxPopulateLocal(DMXInputInfo * dmxInput, dmxArg a)
>                  type = "keyboard";
>                  break;
>              case DMX_LOCAL_MOUSE:
> -                type = "pointer";
> +                type = "pointer ";
>                  break;
>              default:
>                  type = "unknown";

same

> diff --git a/hw/dmx/input/dmxinputinit.h b/hw/dmx/input/dmxinputinit.h
> index 94ec101..5c807a0 100644
> --- a/hw/dmx/input/dmxinputinit.h
> +++ b/hw/dmx/input/dmxinputinit.h
> @@ -112,7 +112,7 @@ typedef struct _DMXLocalInitInfo {
>      int kbdFeedbackClass;                  /**< Non-zero if device has
>                                              * keyboard feedback */
>      int ptrFeedbackClass;                  /**< Non-zero if device has
> -                                            * pointer feedback */
> +                                            * void *feedback */
>      int ledFeedbackClass;                  /**< Non-zero if device has
>                                              * LED indicators */
>      int belFeedbackClass;                  /**< Non-zero if device has a

bad comment

> diff --git a/hw/kdrive/src/kcmap.c b/hw/kdrive/src/kcmap.c
> index c93c2f4..e08ec1b 100644
> --- a/hw/kdrive/src/kcmap.c
> +++ b/hw/kdrive/src/kcmap.c
> @@ -173,13 +173,13 @@ KdUninstallColormap(ColormapPtr pCmap)
>          return;
>  
>      /* install default */
> -    dixLookupResourceByType((pointer *) &defMap, defMapID, RT_COLORMAP,
> +    dixLookupResourceByType((void **) &defMap, defMapID, RT_COLORMAP,
>                              serverClient, DixInstallAccess);
>      if (defMap)
>          (*pCmap->pScreen->InstallColormap) (defMap);
>      else {
> -        /* uninstall and clear colormap pointer */
> -        WalkTree(pCmap->pScreen, TellLostMap, (pointer) &(pCmap->mid));
> +        /* uninstall and clear colormap void **/
> +        WalkTree(pCmap->pScreen, TellLostMap, (void *) &(pCmap->mid));
>          pScreenPriv->pInstalledmap = 0;
>      }
>  }

bad comment

> diff --git a/hw/xfree86/common/xf86Config.h b/hw/xfree86/common/xf86Config.h
> index 84013e1..23fb383 100644
> --- a/hw/xfree86/common/xf86Config.h
> +++ b/hw/xfree86/common/xf86Config.h

> @@ -1019,7 +1019,7 @@ DGAProcessKeyboardEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr keybd)
>  {
>      KeyClassPtr keyc = keybd->key;
>      DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
> -    DeviceIntPtr pointer = GetMaster(keybd, POINTER_OR_FLOAT);
> +    DeviceIntPtr pointer= GetMaster(keybd, POINTER_OR_FLOAT);
>      DeviceEvent ev = {
>          .header = ET_Internal,
>          .length = sizeof(ev),

bad whitespace

> diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
> index a59f4fc..18f9266 100644
> --- a/hw/xfree86/common/xf86Helper.c
> +++ b/hw/xfree86/common/xf86Helper.c
> @@ -64,10 +64,10 @@
>  
>  static int xf86ScrnInfoPrivateCount = 0;
>  
> -/* Add a pointer to a new DriverRec to xf86DriverList */
> +/* Add a void *to a new DriverRec to xf86DriverList */
>  

bad comment

> @@ -104,10 +104,10 @@ xf86DeleteDriver(int drvIndex)
>      }
>  }
>  
> -/* Add a pointer to a new InputDriverRec to xf86InputDriverList */
> +/* Add a void *to a new InputDriverRec to xf86InputDriverList */

bad comment

> diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
> index 6feedc8..60e8059 100644
> --- a/hw/xfree86/common/xf86Init.c
> +++ b/hw/xfree86/common/xf86Init.c

> @@ -1396,7 +1396,7 @@ ddxProcessArgument(int argc, char **argv, int i)
>          xf86ScreenName = argv[++i];
>          return 2;
>      }
> -    if (!strcmp(argv[i], "-pointer")) {
> +    if (!strcmp(argv[i], "-void *")) {
>          CHECK_FOR_REQUIRED_ARGUMENT();
>          xf86PointerName = argv[++i];
>          return 2;

bad code change

> diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
> index 5b0b6a1..cdc4d0f 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -83,7 +83,7 @@
>  
>  #include "mi.h"
>  
> -#include <ptrveloc.h>           /* dix pointer acceleration */
> +#include <ptrveloc.h>           /* dix void *acceleration */
>  #include <xserver-properties.h>
>  
>  #ifdef XFreeXDGA

bad comment

> diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
> index 43b2233..f3b9c35 100644
> --- a/hw/xfree86/modes/xf86Modes.c
> +++ b/hw/xfree86/modes/xf86Modes.c
> @@ -193,7 +193,7 @@ xf86SetModeCrtc(DisplayModePtr p, int adjustFlags)
>  }
>  
>  /**
> - * Fills in a copy of mode, removing all stale pointer references.
> + * Fills in a copy of mode, removing all stale void *references.
>   * xf86ModesEqual will return true when comparing with original mode.
>   */
>  void

bad comment

> @@ -229,7 +229,7 @@ xf86DuplicateMode(const DisplayModeRec * pMode)
>  }
>  
>  /**
> - * Duplicates every mode in the given list and returns a pointer to the first
> + * Duplicates every mode in the given list and returns a void *to the first
>   * mode.
>   *
>   * \param modeList doubly-linked mode list

bad comment

> diff --git a/hw/xfree86/os-support/bus/xf86Pci.h b/hw/xfree86/os-support/bus/xf86Pci.h
> index f69e55b..12e2a42 100644
> --- a/hw/xfree86/os-support/bus/xf86Pci.h
> +++ b/hw/xfree86/os-support/bus/xf86Pci.h
> @@ -234,7 +234,7 @@
>  
>  /* Primitive Types */
>  typedef unsigned long ADDRESS;  /* Memory/PCI address */
> -typedef unsigned long IOADDRESS _X_DEPRECATED;  /* Must be large enough for a pointer */
> +typedef unsigned long IOADDRESS _X_DEPRECATED;  /* Must be large enough for a void **/
>  typedef CARD32 PCITAG _X_DEPRECATED;
>  
>  typedef enum {

bad comment

> diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
> index 68527a5..6625e67 100644
> --- a/hw/xfree86/os-support/solaris/sun_init.c
> +++ b/hw/xfree86/os-support/solaris/sun_init.c

> @@ -372,7 +372,7 @@ xf86ProcessArgument(int argc, char **argv, int i)
>  
>      /*
>       * Undocumented flag to protect page 0 from read/write to help catch NULL
> -     * pointer dereferences.  This is purely a debugging flag.
> +     * void *dereferences.  This is purely a debugging flag.
>       */
>      if (!strcmp(argv[i], "-protect0")) {
>          Protect0 = TRUE;

bad comment

> diff --git a/hw/xfree86/x86emu/x86emu/regs.h b/hw/xfree86/x86emu/x86emu/regs.h
> index 3a7456e..fc1c096 100644
> --- a/hw/xfree86/x86emu/x86emu/regs.h
> +++ b/hw/xfree86/x86emu/x86emu/regs.h
> @@ -307,7 +307,7 @@ Structure maintaining the emulator machine state.
>  MEMBERS:
>  mem_base		- Base real mode memory for the emulator
>  mem_size		- Size of the real mode memory block for the emulator
> -private			- private data pointer
> +private			- private data pointer 
>  x86			- X86 registers
>  ****************************************************************************/
>  typedef struct {

bad comment

> diff --git a/hw/xwin/winallpriv.c b/hw/xwin/winallpriv.c
> index cc3b3d1..46a72ec 100644
> --- a/hw/xwin/winallpriv.c
> +++ b/hw/xwin/winallpriv.c
> @@ -76,7 +76,7 @@ winAllocatePrivates(ScreenPtr pScreen)
>          return FALSE;
>      }
>  
> -    /* Save the screen private pointer */
> +    /* Save the screen private void **/
>      winSetScreenPriv(pScreen, pScreenPriv);
>  
>      /* Reserve GC memory for our privates */

bad commment

> diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
> index 9e38113..b453396 100644
> --- a/hw/xwin/winconfig.c
> +++ b/hw/xwin/winconfig.c
> @@ -106,7 +106,7 @@ winInfoRec g_winInfo = {
>  #ifdef XWIN_XF86CONFIG
>  serverLayoutRec g_winConfigLayout;
>  
> -static Bool ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p);
> +static Bool ParseOptionValue(int scrnIndex, void *options, OptionInfoPtr p);
>  static Bool configLayout(serverLayoutPtr, XF86ConfLayoutPtr, char *);
>  static Bool configImpliedLayout(serverLayoutPtr, XF86ConfScreenPtr);
>  static Bool GetBoolValue(OptionInfoPtr p, const char *s);
> @@ -188,7 +188,7 @@ winReadConfigfile()
>          /* Check if layout is given in the config file */
>          if (g_xf86configptr->conf_flags != NULL) {
>              char *dfltlayout = NULL;
> -            pointer optlist = g_xf86configptr->conf_flags->flg_option_lst;
> +            void *optlist = g_xf86configptr->conf_flags->flg_option_lst;
>  
>              if (optlist && winFindOption(optlist, "defaultserverlayout"))
>                  dfltlayout =
> @@ -516,19 +516,19 @@ winConfigMouse(DeviceIntPtr pDevice)
>              winMsg(mousefrom, "Using pointer \"%s\" as primary pointer\n",
>                     mouse->inp_identifier);
>  
> -        g_winInfo.pointer.emulate3Buttons =
> +        g_winInfo.void *.emulate3Buttons =
>              winSetBoolOption(mouse->inp_option_lst, "Emulate3Buttons", FALSE);
>          if (g_cmdline.emulate3buttons)
> -            g_winInfo.pointer.emulate3Buttons = g_cmdline.emulate3buttons;
> +            g_winInfo.void *.emulate3Buttons = g_cmdline.emulate3buttons;
>  
> -        g_winInfo.pointer.emulate3Timeout =
> +        g_winInfo.void *.emulate3Timeout =
>              winSetIntOption(mouse->inp_option_lst, "Emulate3Timeout", 50);
>          if (g_cmdline.emulate3timeout)
> -            g_winInfo.pointer.emulate3Timeout = g_cmdline.emulate3timeout;
> +            g_winInfo.void *.emulate3Timeout = g_cmdline.emulate3timeout;
>      }
>      else {
> -        winMsg(X_ERROR, "No primary pointer configured\n");
> -        winMsg(X_DEFAULT, "Using compiletime defaults for pointer\n");
> +        winMsg(X_ERROR, "No primary void *configured\n");
> +        winMsg(X_DEFAULT, "Using compiletime defaults for void *\n");
>      }
>  
>      return TRUE;

bad code changes

> diff --git a/hw/xwin/windialogs.c b/hw/xwin/windialogs.c
> index 054ee95..d1acc2f 100644
> --- a/hw/xwin/windialogs.c
> +++ b/hw/xwin/windialogs.c
> @@ -568,7 +568,7 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
>          winDebug("winAboutDlgProc - WM_INITDIALOG\n");
>  #endif
>  
> -        /* Store pointer to private structure for future use */
> +        /* Store void *to private structure for future use */
>          s_pScreenPriv = (winPrivScreenPtr) lParam;
>  
>          winInitDialog(hwndDialog);

bad comment

> diff --git a/include/callback.h b/include/callback.h
> index b427089..df638c0 100644
> --- a/include/callback.h
> +++ b/include/callback.h
> @@ -62,21 +62,21 @@ typedef struct _CallbackList *CallbackListPtr;  /* also in misc.h */
>  #define _XTYPEDEF_CALLBACKLISTPTR
>  #endif
>  
> -typedef void (*CallbackProcPtr) (CallbackListPtr *, pointer, pointer);
> +typedef void (*CallbackProcPtr) (CallbackListPtr *, void *, void *);
>  
>  extern _X_EXPORT Bool AddCallback(CallbackListPtr * /*pcbl */ ,
>                                    CallbackProcPtr /*callback */ ,
> -                                  pointer /*data */ );
> +                                  void */*data */ );
>  
>  extern _X_EXPORT Bool DeleteCallback(CallbackListPtr * /*pcbl */ ,
>                                       CallbackProcPtr /*callback */ ,
> -                                     pointer /*data */ );
> +                                     void */*data */ );
>  
>  extern _X_EXPORT void _CallCallbacks(CallbackListPtr * /*pcbl */ ,
> -                                     pointer /*call_data */ );
> +                                     void */*call_data */ );
>  

missing space between 'void *' and the start of the comment all through
the changes to include/.  I won't point them out individually.

> diff --git a/include/list.h b/include/list.h
> index 455c670..fd80a9a 100644
> --- a/include/list.h
> +++ b/include/list.h
> @@ -230,7 +230,7 @@ xorg_list_is_empty(struct xorg_list *head)
>   * @param ptr Pointer to the struct xorg_list.
>   * @param type Data type of the list element.
>   * @param member Member name of the struct xorg_list field in the list element.
> - * @return A pointer to the data struct containing the list head.
> + * @return A pointer  to the data struct containing the list head.
>   */
>  #ifndef container_of
>  #define container_of(ptr, type, member) \

bad comment

> diff --git a/mi/midispcur.c b/mi/midispcur.c
> index edca969..cf17ca7 100644
> --- a/mi/midispcur.c
> +++ b/mi/midispcur.c
> @@ -79,7 +79,7 @@ typedef struct {
>    (miDCBufferPtr)dixLookupScreenPrivate(&GetMaster(dev, MASTER_POINTER)->devPrivates, miDCDeviceKey, screen))
>  
>  /* 
> - * The core pointer buffer will point to the index of the virtual core pointer
> + * The core void *buffer will point to the index of the virtual core void *
>   * in the pCursorBuffers array. 
>   */

bad comment

> diff --git a/mi/migc.h b/mi/migc.h
> index 8c13b2e..fb9f35c 100644
> --- a/mi/migc.h
> +++ b/mi/migc.h
> @@ -38,7 +38,7 @@ extern _X_EXPORT void miDestroyClip(GCPtr       /*pGC */
>  
>  extern _X_EXPORT void miChangeClip(GCPtr /*pGC */ ,
>                                     int /*type */ ,
> -                                   pointer /*pvalue */ ,
> +                                   void */*pvalue */ ,
>                                     int  /*nrects */
>      );
>  
> diff --git a/mi/miglblt.c b/mi/miglblt.c
> index 1a70911..cd292e9 100644
> --- a/mi/miglblt.c
> +++ b/mi/miglblt.c
> @@ -78,10 +78,9 @@ with the sample server.
>  	fake a call to PutImage from the buffer into the bitmap
>  	use the bitmap in a call to PushPixels
>  */
> -

unrelated whitespace change

> diff --git a/mi/mipointer.h b/mi/mipointer.h
> index bdeed12..c7450bf 100644
> --- a/mi/mipointer.h
> +++ b/mi/mipointer.h
> @@ -109,7 +109,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, double *x, double *y,
>  extern _X_EXPORT void
>  miPointerUpdateSprite(DeviceIntPtr pDev);
>  
> -/* Sets whether the sprite should be updated immediately on pointer moves */
> +/* Sets whether the sprite should be updated immediately on void *moves */
>  extern _X_EXPORT Bool
>  miPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait);
>  

bad comment

> diff --git a/os/xdmcp.c b/os/xdmcp.c
> index 11f1133..da509e4 100644
> --- a/os/xdmcp.c
> +++ b/os/xdmcp.c
> @@ -189,13 +189,13 @@ static void timeout(void);
>  
>  static void restart(void);
>  
> -static void XdmcpBlockHandler(pointer /*data */ ,
> +static void XdmcpBlockHandler(void */*data */ ,
>                                struct timeval ** /*wt */ ,
> -                              pointer /*LastSelectMask */ );
> +                              void */*LastSelectMask */ );
>  
> -static void XdmcpWakeupHandler(pointer /*data */ ,
> +static void XdmcpWakeupHandler(void */*data */ ,
>                                 int /*i */ ,
> -                               pointer /*LastSelectMask */ );
> +                               void */*LastSelectMask */ );
>  
>  /*
>   * Register the Manufacturer display ID

spaces in this file

> diff --git a/randr/rrscreen.c b/randr/rrscreen.c
> index 36179ae..a7ba518 100644
> --- a/randr/rrscreen.c
> +++ b/randr/rrscreen.c
> @@ -152,7 +152,7 @@ RRScreenSizeNotify(ScreenPtr pScreen)
>  
>      RRPointerScreenConfigured(pScreen);
>      /*
> -     * Fix pointer bounds and location
> +     * Fix void *bounds and location
>       */
>      ScreenRestructured(pScreen);
>  }

bad commment

> diff --git a/record/record.c b/record/record.c
> index 2c70460..8217a44 100644
> --- a/record/record.c
> +++ b/record/record.c
> @@ -130,13 +130,13 @@ static int numEnabledRCAPs;
>   *  returns an error.
>   */
>  #define VERIFY_CONTEXT(_pContext, _contextid, _client) { \
> -    int rc = dixLookupResourceByType((pointer *)&(_pContext), _contextid, \
> +    int rc = dixLookupResourceByType((void **)&(_pContext), _contextid, \
>                                       RTContext, _client, DixUseAccess); \
>      if (rc != Success) \
>  	return rc; \
>  }
>  
> -static int RecordDeleteContext(pointer /*value */ ,
> +static int RecordDeleteContext(void */*value */ ,
>                                 XID      /*id */
>      );
>  

space

> diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c
> index 0947898..153faa8 100644
> --- a/test/xi2/protocol-common.c
> +++ b/test/xi2/protocol-common.c
> @@ -142,7 +142,7 @@ init_devices(void)
>  
>      AllocDevicePair(&client, "Virtual core", &devices.vcp, &devices.vck,
>                      CorePointerProc, CoreKeyboardProc, TRUE);
> -    inputInfo.pointer = devices.vcp;
> +    inputInfo.pointer= devices.vcp;
>  
>      inputInfo.keyboard = devices.vck;
>      ActivateDevice(devices.vcp, FALSE);

bad whitespace
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20131229/0141f1eb/attachment-0001.pgp>


More information about the xorg-devel mailing list