Page 1 of 1

warning wxpdfdoc

Posted: Thu Jan 19, 2006 8:45 am
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

Re: warning wxpdfdoc

Posted: Thu Jan 19, 2006 10:35 am
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

suite wxpdf src pdfdoc

Posted: Thu Jan 19, 2006 4:41 pm
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