Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8354318

freetype.c: compilation error: 'incompatible pointer type' with gcc 14

XMLWordPrintable

    • master
    • linux

      To reproduce, use gcc 14 to build JavaFX on Linux. It produces the following error:

      modules/javafx.graphics/src/main/native-font/freetype.c: In function 'checkSize':
      modules/javafx.graphics/src/main/native-font/freetype.c:523:33: error: initialization of 'jbyte *' {aka 'signed char *'} from incompatible pointer type 'jfloat *' {aka 'float *'} [-Wincompatible-pointer-types]
        523 | jbyte* newPointCoords = (jfloat*)realloc(info->pointCoords, info->lenCoords * sizeof(jfloat));
            | ^
      modules/javafx.graphics/src/main/native-font/freetype.c:525:27: error: assignment to 'jfloat *' {aka 'float *'} from incompatible pointer type 'jbyte *' {aka 'signed char *'} [-Wincompatible-pointer-types]
        525 | info->pointCoords = newPointCoords;
            | ^

      > Task :graphics:ccLinuxFontFreetype FAILED

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: