Bug 39426 - Object::dictLookup() not C++ conforming in libpoppler-dev
Summary: Object::dictLookup() not C++ conforming in libpoppler-dev
Status: RESOLVED WONTFIX
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 07:19 UTC by rpkrawczyk
Modified: 2011-07-21 08:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description rpkrawczyk 2011-07-21 07:19:37 UTC
In libpoppler-dev there is a minor problem. The function declaration of Object::dictLookup and Object::dictLookupNF ist

In libpoppler-dev:
Package: libpoppler-dev
Architecture: amd64
Source: poppler
in Ubuntu release: Description: Ubuntu 11.04, Release: 11.04
is a minor coding style bug. The function declaration("Object.h", line 216):

  Object *dictLookup(char *key, Object *obj, std::set<int> *fetchOriginatorNums = NULL);
  Object *dictLookupNF(char *key, Object *obj);

is not conforming to C++ standards. The first argument key is constant, so if providing a constant string via "somestring" one gets a compile time warning. The same is true for ("Dict.h", line 75):

  Object *lookup(char *key, Object *obj, std::set<int> *fetchOriginatorNums = NULL);
  Object *lookupNF(char *key, Object *obj);

Later on in the code it is correctly a "const char *". Please fix to get rid of this annoying warning.

Do you need anything else?
Comment 1 rpkrawczyk 2011-07-21 07:26:01 UTC
Sorry, I forgot to mention that this is version 0.16.4-0ubuntu1 I am using. As far as I can see, the newest release 0.16.7 contains the same problem.
Comment 2 rpkrawczyk 2011-07-21 07:34:28 UTC
OK, I just checked the unstable release 0.17.1. Same problem there.
Comment 3 Albert Astals Cid 2011-07-21 08:56:21 UTC
This has been discussed again and again and again. You have two options:
a) Do not use poppler internals but one of the frontends as we suggest
b) Use -Wno-write-strings


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.