It's a kludge, but by disabling the warnings on those two lines the project compiled without errors. Diff below.

Regards, Jim

<code>

*** video.c~    2023-11-26 11:10:14.000000000 -0800
--- video.c    2024-01-26 16:19:19.158357528 -0800
***************
*** 61,70 ****
          goto fail_codec;
      }

!     container_format = container_format_context->oformat;

      /* Pull codec based on name */
      AVCodec* codec = avcodec_find_encoder_by_name(codec_name);
      if (codec == NULL) {
          guacenc_log(GUAC_LOG_ERROR, "Failed to locate codec \"%s\".",
                  codec_name);
--- 61,74 ----
          goto fail_codec;
      }

!  _Pragma("GCC diagnostic push")
!  _Pragma("GCC diagnostic ignored \"-Wdiscarded-qualifiers\"")
!
!    container_format = container_format_context->oformat;

      /* Pull codec based on name */
      AVCodec* codec = avcodec_find_encoder_by_name(codec_name);
+  _Pragma("GCC diagnostic pop")
      if (codec == NULL) {
          guacenc_log(GUAC_LOG_ERROR, "Failed to locate codec \"%s\".",
                  codec_name);
<\code>

Guacamole 1.5.4, from the tar on the website. I did the ./configure and then ./make. Many files compile just fine, but the task ends with the following error:

<code>
CC       guacenc-video.o
video.c: In function ‘guacenc_video_alloc’:
video.c:64:22: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   64 |     container_format = container_format_context->oformat;
      |                      ^
video.c:67:22: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   67 |     AVCodec* codec = avcodec_find_encoder_by_name(codec_name);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

<\code>

I'm compiling on a Raspberry Pi 4. GCC gives me the following version:

gcc (Raspbian 12.2.0-14+rpi1) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.

Any suggestions?

Regards, Jim Ham

--
Porcine Associates LLC
244 O'Connor St.
Menlo Park, CA 94025
USA
+1(650)326-2669 fax +1(650)326-1071


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org

Reply via email to