On Wed, May 24, 2023 at 07:39:20AM +0200, Laszlo Ersek wrote: > Going through the changes individually, it seems like we could eliminate > a handful of the casts altogether; for examle (char *)"string literal" > ones.
It'd be interesting to remove then and compile with './configure --enable-gcc-warnings' to see if that creates new warnings. > (The C standard effectively says that a (non-wide) string literal > has type "static char[n]", not "static const char[n]".) But that > would be a different patch, plus I can imagine we have those casts > in the first place because gcc complained or whatever. :) It's a bit surprising. Surely any string literal is placed in the text section so definitely not writable? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs