15.12.11

Seen during a recent compile of mozilla-central with Clang, offered without comment

TestStartupCache.cpp
/home/jwalden/moz/inttypes/startupcache/test/TestStartupCache.cpp:119:15: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
  char* buf = "Market opportunities for BeardBook";
              ^
/home/jwalden/moz/inttypes/startupcache/test/TestStartupCache.cpp:120:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
  char* id = "id";
             ^
/home/jwalden/moz/inttypes/startupcache/test/TestStartupCache.cpp:148:15: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
  char* buf = "BeardBook competitive analysis";
              ^
/home/jwalden/moz/inttypes/startupcache/test/TestStartupCache.cpp:149:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
  char* id = "id";
             ^
/home/jwalden/moz/inttypes/startupcache/test/TestStartupCache.cpp:197:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
  char* id = "id";
             ^
/home/jwalden/moz/inttypes/startupcache/test/TestStartupCache.cpp:288:15: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
  char* buf = "Find your soul beardmate on BeardBook";
              ^
/home/jwalden/moz/inttypes/startupcache/test/TestStartupCache.cpp:289:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
  char* id = "id";
             ^
/home/jwalden/moz/inttypes/startupcache/test/TestStartupCache.cpp:323:12: warning: unused variable 'rv2' [-Wunused-variable]
  nsresult rv2;
           ^
8 warnings generated.

4 Comments »

  1. I just saw the same thing with GCC with -Wwrite-strings. The obvious fix doesn’t work, though, because they feed into nsIStartupCache::putBuffer()… sigh.

    Comment by njn — 15.12.11 @ 21:03

  2. With all that “no shaving in december” going on, I think quite a few people are running around with beards, looking for beardmates 😀

    Comment by Arpad Borsos — 16.12.11 @ 03:20

  3. Bug filed already: https://bugzilla.mozilla.org/show_bug.cgi?id=609710

    Comment by Daniel Holbert — 16.12.11 @ 07:49

  4. …and now I get the joke, nevermind RE bug. 🙂

    Comment by Daniel Holbert — 16.12.11 @ 08:16

RSS feed for comments on this post. TrackBack URI

Leave a comment

HTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>