[all-commits] [llvm/llvm-project] b1d75f: [lldb][test] Fix cast dropping const warnin in Tes...

David Spickett via All-commits all-commits at lists.llvm.org
Mon Aug 19 08:18:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b1d75fe48c940ba677614db3d891fbebcb8a41a2
      https://github.com/llvm/llvm-project/commit/b1d75fe48c940ba677614db3d891fbebcb8a41a2
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M lldb/unittests/Callback/TestBreakpointSetCallback.cpp

  Log Message:
  -----------
  [lldb][test] Fix cast dropping const warnin in TestBreakpointSetCallback.cpp

When building with gcc I get this warning:
```
<...>TestBreakpointSetCallback.cpp:58:25: warning: cast from type ‘const char*’ to type ‘void*’ casts away qualifiers [-Wcast-qual]
   58 |   void *baton = (void *)"hello";
      |                         ^~~~~~~
```

Use the address of a mutable global variable instead. All we care about
is that the address passed as the baton is the same one we get later.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list