ports/print/hpijs/files/patch-registry.cpp
Jan Beich b682b1cf43 print/hpijs: unbreak with libc++ 3.9
registry.cpp:249:9: error: cannot initialize a variable of type 'char *' with an rvalue of type
      'const char *'
                char    *cmdStr = strstr ((const char *) DevIDBuffer+2, "CMD:");
                         ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dj3320.cpp:429:24: error: assigning to 'char *' from incompatible type 'const char *'
            if ((pcStr = strstr((const char*)pLDLEncap->byStatusBuff + 10, "$S:")) == NULL)
                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PR:		212343
Regressed by:	https://github.com/llvm-mirror/libcxx/commit/b4aa97130b8b
2017-01-03 21:04:28 +00:00

11 lines
418 B
C++

--- registry.cpp.orig 2005-08-22 18:47:00 UTC
+++ registry.cpp
@@ -246,7 +246,7 @@ DRIVER_ERROR DeviceRegistry::SelectDevic
device = eDJ3320;
match = TRUE;
}
- char *cmdStr = strstr ((const char *) DevIDBuffer+2, "CMD:");
+ const char *cmdStr = strstr ((const char *) DevIDBuffer+2, "CMD:");
if (!cmdStr)
{
cmdStr = strstr ((const char *) DevIDBuffer+2, "COMMAND SET:");