warning wxpdfdoc

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
Post Reply
JPlaroche
Earned some good credits
Earned some good credits
Posts: 131
Joined: Fri Dec 09, 2005 4:58 pm
Contact:

warning wxpdfdoc

Post by JPlaroche »

C:\Dev-Cpp\include\wx\wxPdf\pdfdoc.cpp In member function `virtual void wxPdfDocument::PutResourceDict()':
3431 C:\Dev-Cpp\include\wx\wxPdf\pdfdoc.cpp [Warning] int format, long int arg (arg 2)


C:\Dev-Cpp\include\wx\wxPdf\pdfdoc.cpp In member function `virtual void wxPdfDocument::PutPages()':
2872 C:\Dev-Cpp\include\wx\wxPdf\pdfdoc.cpp [Warning] int format, different type arg (arg 2)

please is possible elimine to warning

help my

thank
apprendre et developper en C++ des sub routine interfac� HIM et BD pour validation acquis
Jean-Pierre

project define DB descripteur idem IBM400
http://www.ombrebleu.com/wxsrc/src/
utelle
Moderator
Moderator
Posts: 1046
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: warning wxpdfdoc

Post by utelle »

Questions regarding wxCode components should be posted in the wxCode section of this forum.
JPlaroche wrote:C:\Dev-Cpp\include\wx\wxPdf\pdfdoc.cpp In member function `virtual void wxPdfDocument::PutResourceDict()':
3431 C:\Dev-Cpp\include\wx\wxPdf\pdfdoc.cpp [Warning] int format, long int arg (arg 2)

C:\Dev-Cpp\include\wx\wxPdf\pdfdoc.cpp In member function `virtual void wxPdfDocument::PutPages()':
2872 C:\Dev-Cpp\include\wx\wxPdf\pdfdoc.cpp [Warning] int format, different type arg (arg 2)

please is possible elimine to warning
I don't see any warnings neither when compiling with VC++ 6 nor when compiling with GCC 4.0.2. In both cases there are calls to wxString::Format involved. Which compiler do you use? Although I find it unlikely, maybe your compiler checks the format codes in the format string (1. argument) against the types of the following arguments? If so, probably explicitly casting the 2. argument to int eliminates the warning.

Regards,

Ulrich
JPlaroche
Earned some good credits
Earned some good credits
Posts: 131
Joined: Fri Dec 09, 2005 4:58 pm
Contact:

suite wxpdf src pdfdoc

Post by JPlaroche »

chg
line 2871
int xput = p->TellO();
OutAscii(wxString(_T("<<")) + filter + wxString(_T("/Length ")) +
wxString::Format(_T("%d"), xput) + wxString(_T(">>")));

// wxString::Format(_T("%d"), p->TellO()) + wxString(_T(">>")));


line 3432
for (gradient = m_gradients->begin(); gradient != m_gradients->end(); gradient++)
{ xgrad = gradient->first; //gradient->first
//foreach(m_gradients as $id=>$grad)
OutAscii(wxString::Format(_T("/Sh%d %d 0 R"), xgrad, gradient->second->GetObjIndex()));
}

// OutAscii(wxString::Format(_T("/Sh%d %d 0 R"), gradient->first, gradient->second->GetObjIndex()));


Thank you for the explanation

I changed as as it

It is correct

I have re tested it focntionne indeed
Under dev-cpp or wxdevcpp

Thank you still for your help(assistant)

Excuse my englais ( translator) but the is read
Your Web site is very int
apprendre et developper en C++ des sub routine interfac� HIM et BD pour validation acquis
Jean-Pierre

project define DB descripteur idem IBM400
http://www.ombrebleu.com/wxsrc/src/
Post Reply