On 11/09/11 05:54, walter harms wrote:
-static char *direction[4] = {
+static const char *direction[4] = {
      "normal",
      "left",
      "inverted",


just nit picking:
  this would be more consistent e.g with below.

    static const char *direction[]= {

Perhaps, though the number of connection types is more likely to grow than the
number of directions.   I don't really think that's worth worrying about though.

diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index dcd3a28..49cc149 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -272,7 +272,7 @@ xf86ModesEqual(const DisplayModeRec *pMode1, const 
DisplayModeRec *pMode2)
  }

  static void
-add(char **p, char *new)
+add(char **p, const char *new)
  {
      *p = xnfrealloc(*p, strlen(*p) + strlen(new) + 2);
      strcat(*p, " ");

        this looks like a case for asprintf()

Yes it does, though that wouldn't belong in this patch, since it has nothing
to do with clearing the -Wwrite-strings warnings.   Separate patch to come.

--
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to