Don't cast away const in find_and_open_source
[deliverable/binutils-gdb.git] / gdb / source.c
index b61880ab503c6f957de9120d0bc77c3f06a1ad2c..9a30209880b9a5ca56677d5e5dab0c6ca8a827a2 100644 (file)
@@ -1009,9 +1009,7 @@ find_and_open_source (const char *filename,
       /* Replace a path entry of $cdir with the compilation directory
         name.  */
 #define        cdir_len        5
-      /* We cast strstr's result in case an ANSIhole has made it const,
-         which produces a "required warning" when assigned to a nonconst.  */
-      p = (char *) strstr (source_path, "$cdir");
+      p = strstr (source_path, "$cdir");
       if (p && (p == path || p[-1] == DIRNAME_SEPARATOR)
          && (p[cdir_len] == DIRNAME_SEPARATOR || p[cdir_len] == '\0'))
        {
This page took 0.025148 seconds and 4 git commands to generate.