ladybird/Ports/freedink/patches/0002-Add-required-const-to-char-declarations.patch
Tim Ledbetter cecc554102 Ports/freedink: Add required const to char* declarations
This allows FreeDink to be built with GCC 13.
2023-08-21 15:30:35 +02:00

26 lines
1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tim Ledbetter <timledbetter@gmail.com>
Date: Wed, 2 Aug 2023 23:56:50 +0100
Subject: [PATCH] Add required const to char* declarations
---
src/gfx_fonts.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gfx_fonts.cpp b/src/gfx_fonts.cpp
index b00816e922a619e93f2ce9f3d4e202da0da9fa36..2cedd8af5fd99edf7a31ea7b6eeeabe09ede180c 100644
--- a/src/gfx_fonts.cpp
+++ b/src/gfx_fonts.cpp
@@ -293,10 +293,10 @@ void set_font_color(int no, int r, int g, int b)
*/
void setup_font(TTF_Font *font)
{
- char *familyname = TTF_FontFaceFamilyName(font);
+ const char *familyname = TTF_FontFaceFamilyName(font);
if(familyname)
log_info("The family name of the face in the font is: %s", familyname);
- char *stylename = TTF_FontFaceStyleName(font);
+ const char *stylename = TTF_FontFaceStyleName(font);
if(stylename)
log_info("The name of the face in the font is: %s", stylename);
log_info("The font max height is: %d", TTF_FontHeight(font));