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

Side by Side Diff: third_party/mesa/MesaLib/src/mapi/glapi/glapi_nop.c

Issue 7523033: Eliminate a warning in a failure case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Mesa 3-D graphics library 2 * Mesa 3-D graphics library
3 * Version: 7.8 3 * Version: 7.8
4 * 4 *
5 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. 5 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
6 * Copyright (C) 2010 VMware, Inc. All Rights Reserved. 6 * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"), 9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation 10 * to deal in the Software without restriction, including without limitation
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 /* 81 /*
82 * Defines for the glapitemp.h functions. 82 * Defines for the glapitemp.h functions.
83 */ 83 */
84 #define KEYWORD1 static 84 #define KEYWORD1 static
85 #define KEYWORD1_ALT static 85 #define KEYWORD1_ALT static
86 #define KEYWORD2 GLAPIENTRY 86 #define KEYWORD2 GLAPIENTRY
87 #define NAME(func) NoOp##func 87 #define NAME(func) NoOp##func
88 #define DISPATCH(func, args, msg) Warn(#func); 88 #define DISPATCH(func, args, msg) Warn(#func);
89 #define RETURN_DISPATCH(func, args, msg) Warn(#func); return 0 89 #define RETURN_DISPATCH(type, func, args, msg) Warn(#func); return (type)0
90 90
91 91
92 /* 92 /*
93 * Defines for the table of no-op entry points. 93 * Defines for the table of no-op entry points.
94 */ 94 */
95 #define TABLE_ENTRY(name) (_glapi_proc) NoOp##name 95 #define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
96 96
97 #else 97 #else
98 98
99 static int 99 void
100 NoOpGeneric(void) 100 NoOpGeneric(void)
101 { 101 {
102 #if !defined(_WIN32_WCE) 102 #if !defined(_WIN32_WCE)
103 if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) { 103 if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
104 fprintf(stderr, "GL User Error: calling GL function without a rendering co ntext\n"); 104 fprintf(stderr, "GL User Error: calling GL function without a rendering co ntext\n");
105 } 105 }
106 #endif 106 #endif
107 return 0;
108 } 107 }
109 108
110 /** 109 /**
111 * This is called if the user somehow calls an unassigned GL dispatch function. 110 * This is called if the user somehow calls an unassigned GL dispatch function.
112 */ 111 */
113 static GLint 112 static GLint
114 NoOpUnused(void) 113 NoOpUnused(void)
115 { 114 {
116 return NoOpGeneric(); 115 NoOpGeneric();
116 return 0;
117 } 117 }
118 118
119 /* 119 /*
120 * It is necessary to generate custom no-op entry points at least on 120 * It is necessary to generate custom no-op entry points at least on
121 * Windows, where the __stdcall calling convention is used (callee 121 * Windows, where the __stdcall calling convention is used (callee
122 * cleans the stack). This calling convention can not tolerate a 122 * cleans the stack). This calling convention can not tolerate a
123 * mismatch between the numbers of arguments in caller and callee. 123 * mismatch between the numbers of arguments in caller and callee.
124 */ 124 */
125 #define KEYWORD1 static 125 #define KEYWORD1 static
126 #define KEYWORD1_ALT static 126 #define KEYWORD1_ALT static
127 #define KEYWORD2 GLAPIENTRY 127 #define KEYWORD2 GLAPIENTRY
128 #define NAME(func) NoOp##func 128 #define NAME(func) NoOp##func
129 #define DISPATCH(func, args, msg) NoOpGeneric(); 129 #define DISPATCH(func, args, msg) NoOpGeneric();
130 #define RETURN_DISPATCH(func, args, msg) return NoOpGeneric(); 130 #define RETURN_DISPATCH(type, func, args, msg) NoOpGeneric(); return (type)0
131 131
132 /* 132 /*
133 * Defines for the table of no-op entry points. 133 * Defines for the table of no-op entry points.
134 */ 134 */
135 #define TABLE_ENTRY(name) (_glapi_proc) NoOp##name 135 #define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
136 136
137 #endif 137 #endif
138 138
139 #define DISPATCH_TABLE_NAME __glapi_noop_table 139 #define DISPATCH_TABLE_NAME __glapi_noop_table
140 #define UNUSED_TABLE_NAME __unused_noop_functions 140 #define UNUSED_TABLE_NAME __unused_noop_functions
141 141
142 #include "glapi/glapitemp.h" 142 #include "glapi/glapitemp.h"
OLDNEW
« no previous file with comments | « third_party/mesa/MesaLib/src/mapi/glapi/glapi_dispatch.c ('k') | third_party/mesa/MesaLib/src/mapi/glapi/glapitemp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698