mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
cgen: ignore -Wcast-qual when making a roslice
This commit is contained in:
1 parent
70c1a78cd8
commit
bdba035779
3 files changed
+38
-6
No files matched your search
@@ -171,12 +171,16 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, sideEffectsOnly bool, depth u
|
||||
} else {
|
||||
b.writes("wuffs_base__make_slice_u8_ij(")
|
||||
}
|
||||
if lhs.MType().IsReadOnly() {
|
||||
b.writes("(uint8_t*)")
|
||||
lhsIsReadOnly := lhs.MType().IsReadOnly()
|
||||
if lhsIsReadOnly {
|
||||
b.writes("wuffs_base__strip_const_from_u8_ptr(")
|
||||
}
|
||||
if err := g.writeExpr(b, lhs, false, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
if lhsIsReadOnly {
|
||||
b.writes(")")
|
||||
}
|
||||
if mhs == nil {
|
||||
// No-op.
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user