Your message dated Sun, 28 Oct 2018 23:29:15 +0100
with message-id <[email protected]>
and subject line There are no -xpm/-noxpm packages nor gd 2.0.x in (old)stable
has caused the Debian Bug report #294919,
regarding libgd2-noxpm-dev: Allow const strings to be passed to 
gdImageStringFT()
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
294919: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294919
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libgd2-noxpm-dev
Version: 2.0.33-1.1
Severity: normal

At the moment, the gcc will issue a warning when using gdImageStringFT()
with const strings.  I discovered this while compiling mapserver with
lots of warning flags.

The declaration in /usr/include/gd.h currently look like this:

  /* FreeType 2 text output */
  BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg,
                         char *fontlist, double ptsize, double angle, int x,
                         int y, char *string);

The problem is the use of 'char *' instead of 'const char *'.  This
example program demonstrate the problem.  As far as I can see, the
code do not write to the strings, so it should be safe to convert the
function to use 'const char *'.

Here is an example program demonstrating the issue.  The program is
not supposed to run (the other arguments are bogus. :) Compile with
gcc -Wall to see the warnings:

/*
 * Demonstrate the following warning in gd.h:

x.c: In function `main':
x.c:5: warning: passing arg 4 of `gdImageStringFT' discards qualifiers from 
pointer target type
x.c:5: warning: passing arg 9 of `gdImageStringFT' discards qualifiers from 
pointer target type

 */
#include <gd.h>
const char fontlist[] = "font";
const char string[] = "hello world";
int main(int argc, char *argv[]) {
  const char *fontlist = "font";
  char *s = gdImageStringFT (NULL, NULL, 0, fontlist, 0.0, 0.0, 0, 0, string);
  return s ? 0 : 1;
}

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.26-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libgd2-noxpm-dev depends on:
ii  libc6-dev                   2.3.2.ds1-20 GNU C Library: Development Librari
ii  libfreetype6-dev            2.1.7-2.3    FreeType 2 font engine, developmen
ii  libgd2-noxpm                2.0.33-1.1   GD Graphics Library version 2 (wit
ii  libjpeg62-dev               6b-9         Development files for the IJG JPEG
ii  libpng12-dev [libpng12-0-de 1.2.8rel-1   PNG library - development
ii  zlib1g-dev                  1:1.2.2-4    compression library - development

-- no debconf information


--- End Message ---
--- Begin Message ---
Version: 2.1.0-5

Just cleaning up old bugreports…

If you believe that the bug is still present in stable version of Debian, 
please update the bug accordingly and reopen it.

Thanks,
--
Ondřej Surý
[email protected]

--- End Message ---

Reply via email to