Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot cast 0 to QCString in htmldocvisitor.cpp (Origin: bugzilla #670853) #4584

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Copy link
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component build for ---
Reported in version 1.8.1 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2012-02-26 22:11:18 +0000, Dagobert Michelsen wrote:

Created attachment 208456
Use explicit QCString instead of 0

I am trying to compile doxygen 1.8.0 on Solaris 9 Sparc with Sun Studio 12.

In htmldocvisitor.cpp there is a ternary operator where one term expands to 0 whereas the other expands to a QCString yielding an error that the types cannot be cast to oneanother. The attached patch replaces the 0 by an empty QCString which is probably not the best solution, but my knowledge in the API is limited.

On 2012-02-27 20:08:09 +0000, Dimitri van Heesch wrote:

Hi Dagobert,

I plan to use

startLink(ref->ref(),ref->file(),ref->relPath(),ref->isSubPage() ? QCString() : ref->anchor());

can you check for me if that also works?

On 2012-02-28 13:00:53 +0000, Dagobert Michelsen wrote:

Yes, that also compiles cleanly.

On 2012-05-19 20:44:17 +0000, Dagobert Michelsen wrote:

The same issue happens to appear in index.cpp in 1.8.1 which can also be fixed with the same idiom:

diff --git a/src/index.cpp b/src/index.cpp
index a5f4754..8f6a819 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -605,18 +605,18 @@ static void writeDirTreeNode(OutputList &ol, DirDef dd, int level, FTVHelp ftv
if (doc || src)
{
ol.startIndexListItem();

  •      ol.startIndexItem(doc ? fd->getReference() : 0,
    
  •                        doc ? fd->getOutputFileBase() : 0);
    
  •      ol.startIndexItem(doc ? fd->getReference() : QCString(),
    
  •                        doc ? fd->getOutputFileBase() : QCString());
         ol.parseText(fd->displayName());
    
  •      ol.endIndexItem(doc ? fd->getReference() : 0,
    
  •                      doc ? fd->getOutputFileBase() : 0);
    
  •      ol.endIndexItem(doc ? fd->getReference() : QCString(),
    
  •                      doc ? fd->getOutputFileBase() : QCString());
         ol.endIndexListItem();
         if (ftv)
         {
           ftv->addContentsItem(FALSE,
               fd->displayName(),
    
  •            doc ? fd->getReference() : 0,
    
  •            doc ? fd->getOutputFileBase() : 0,0,
    
  •            doc ? fd->getReference() : QCString(),
    
  •            doc ? fd->getOutputFileBase() : QCString(),0,
               FALSE,FALSE,fd); 
         }
       }
    

@@ -693,8 +693,8 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
if ((!fullPathNames || fd->getDirDef()==0) && (doc || src))
{
ftv->addContentsItem(FALSE,fd->displayName(),

  •          doc ? fd->getReference() : 0,
    
  •          doc ? fd->getOutputFileBase() : 0, 
    
  •          doc ? fd->getReference() : QCString(),
    
  •          doc ? fd->getOutputFileBase() : QCString(), 
             0,
             FALSE,FALSE,fd); 
         if (addToIndex)
    

On 2012-05-20 09:31:47 +0000, Dimitri van Heesch wrote:

Thanks. I'll fix this and try to avoid such constructs in the future.

On 2012-06-10 09:41:44 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.1.1. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

On 2012-08-11 14:45:15 +0000, Dagobert Michelsen wrote:

The error appeared again in src/filedef.cpp in 1.8.2

On 2012-08-11 14:46:17 +0000, Dagobert Michelsen wrote:

Created attachment 220925
QCString issues in 1.8.2

On 2012-08-19 08:39:09 +0000, Dimitri van Heesch wrote:

Thanks, it appears to be difficult not to introduce new instances when non of the compilers I use complain :-(

On 2012-12-26 16:09:16 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.3. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

On 2012-12-28 20:06:34 +0000, Dagobert Michelsen wrote:

I just verified doxygen 1.8.3 is clean of such error.

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.