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

Side by Side Diff: xfa/fxfa/fm2js/xfa_error.h

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
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 #ifndef XFA_FXFA_FM2JS_XFA_ERROR_H_ 7 #ifndef XFA_FXFA_FM2JS_XFA_ERROR_H_
8 #define XFA_FXFA_FM2JS_XFA_ERROR_H_ 8 #define XFA_FXFA_FM2JS_XFA_ERROR_H_
9 9
10 #include "core/fxcrt/include/fx_string.h" 10 #include "core/fxcrt/include/fx_string.h"
11 #include "core/fxcrt/include/fx_system.h" 11 #include "core/fxcrt/include/fx_system.h"
12 12
Tom Sepez 2016/04/26 15:51:04 what if you did enum XFA_FM_ERRMSG : uint32_t {
dsinclair 2016/04/26 15:57:39 Nope, same error.
13 enum XFA_FM_ERRMSG { 13 #define FMERR_UNSUPPORTED_CHAR L"unsupported char '%c'"
Tom Sepez 2016/04/26 16:03:58 I think I'd be happier if we had extern const FX_W
dsinclair 2016/04/26 16:36:46 Done.
14 FMERR_UNSUPPORTED_CHAR, 14 #define FMERR_BAD_SUFFIX_NUMBER L"bad suffix on number"
15 FMERR_BAD_SUFFIX_NUMBER, 15 #define FMERR_INVALIDATE_CHAR L"invalidate char '%c'"
16 FMERR_INVALIDATE_CHAR, 16 #define FMERR_EXPECTED_IDENTIFIER L"expected identifier instead of '%s'"
17 FMERR_EXPECTED_IDENTIFIER, 17 #define FMERR_EXPECTED_TOKEN L"expected '%s' instead of '%s'"
18 FMERR_EXPECTED_TOKEN, 18 #define FMERR_EXPECTED_IFEND L"expected 'endif' instead of '%s'"
19 FMERR_EXPECTED_IFEND, 19 #define FMERR_UNEXPECTED_EXPRESSION L"unexpected expression '%s'"
20 FMERR_UNEXPECTED_EXPRESSION, 20 #define FMERR_EXPTECTED_OPERATOR L"expected operator '%s' instead of '%s'"
21 FMERR_EXPTECTED_OPERATOR, 21 #define FMERR_EXPECTED_NON_EMPTY_EXPRESSION L"expected non-empty expression"
22 FMERR_EXPECTED_NON_EMPTY_EXPRESSION,
23 FMERR_MAXIMUM
24 };
25 22
26 class CXFA_FMErrorInfo { 23 class CXFA_FMErrorInfo {
27 public: 24 public:
28 CXFA_FMErrorInfo() : linenum(0) {} 25 CXFA_FMErrorInfo() : linenum(0) {}
29 ~CXFA_FMErrorInfo() {} 26 ~CXFA_FMErrorInfo() {}
30 uint32_t linenum; 27 uint32_t linenum;
31 CFX_WideString message; 28 CFX_WideString message;
32 }; 29 };
33 const FX_WCHAR* XFA_FM_ErrorMsg(XFA_FM_ERRMSG msg);
34 30
35 #endif // XFA_FXFA_FM2JS_XFA_ERROR_H_ 31 #endif // XFA_FXFA_FM2JS_XFA_ERROR_H_
OLDNEW
« no previous file with comments | « xfa.gyp ('k') | xfa/fxfa/fm2js/xfa_error.cpp » ('j') | xfa/fxfa/fm2js/xfa_error.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698