Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: xfa/fxfa/fm2js/xfa_lexer.cpp

Issue 1921323002: Fix Wvarargs warning in XFA error code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« xfa/fxfa/fm2js/xfa_error.cpp ('K') | « xfa/fxfa/fm2js/xfa_lexer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/fm2js/xfa_lexer.h" 7 #include "xfa/fxfa/fm2js/xfa_lexer.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 10
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 if (uHash == keyword.m_uHash) 525 if (uHash == keyword.m_uHash)
526 return keyword.m_type; 526 return keyword.m_type;
527 if (uHash < keyword.m_uHash) 527 if (uHash < keyword.m_uHash)
528 iEnd = iMid - 1; 528 iEnd = iMid - 1;
529 else 529 else
530 iStart = iMid + 1; 530 iStart = iMid + 1;
531 } while (iStart <= iEnd); 531 } while (iStart <= iEnd);
532 return TOKidentifier; 532 return TOKidentifier;
533 } 533 }
534 534
535 void CXFA_FMLexer::Error(XFA_FM_ERRMSG msg, ...) { 535 void CXFA_FMLexer::Error(const FX_WCHAR* msg, ...) {
536 m_pErrorInfo->linenum = m_uCurrentLine; 536 m_pErrorInfo->linenum = m_uCurrentLine;
537 const FX_WCHAR* lpMessageInfo = XFA_FM_ErrorMsg(msg);
538 va_list ap; 537 va_list ap;
539 va_start(ap, msg); 538 va_start(ap, msg);
540 m_pErrorInfo->message.FormatV(lpMessageInfo, ap); 539 m_pErrorInfo->message.FormatV(msg, ap);
541 va_end(ap); 540 va_end(ap);
542 } 541 }
543 542
544 FX_BOOL CXFA_FMLexer::HasError() const { 543 FX_BOOL CXFA_FMLexer::HasError() const {
545 if (m_pErrorInfo->message.IsEmpty()) { 544 if (m_pErrorInfo->message.IsEmpty()) {
546 return FALSE; 545 return FALSE;
547 } 546 }
548 return TRUE; 547 return TRUE;
549 } 548 }
OLDNEW
« xfa/fxfa/fm2js/xfa_error.cpp ('K') | « xfa/fxfa/fm2js/xfa_lexer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698