1 /* ************************************************************************ 2 * Copyright 2013 Advanced Micro Devices, Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * ************************************************************************/ 16 17 18 #ifndef DIS_WARNING_H_ 19 #define DIS_WARNING_H_ 20 21 #if _MSC_VER 22 23 #pragma warning (disable:4204) 24 #pragma warning (disable:4127) 25 #define MAY_ALIAS 26 27 #else /* _MSC_VER */ 28 29 #define MAY_ALIAS __attribute__((__may_alias__)) 30 31 #endif 32 33 34 /* 35 * Set of macro to mute gcc when we don't need in using some 36 * function arguments 37 */ 38 39 #define DUMMY_ARG_USAGE(arg) \ 40 do { \ 41 (void)arg; \ 42 } while (0) 43 44 #define DUMMY_ARGS_USAGE_2(arg1, arg2) \ 45 do { \ 46 (void)arg1; \ 47 (void)arg2; \ 48 } while (0) 49 50 #define DUMMY_ARGS_USAGE_3(arg1, arg2, arg3) \ 51 do { \ 52 (void)arg1; \ 53 (void)arg2; \ 54 (void)arg3; \ 55 } while(0) \ 56 57 #define DUMMY_ARGS_USAGE_4(arg1, arg2, arg3, arg4) \ 58 do { \ 59 (void)arg1; \ 60 (void)arg2; \ 61 (void)arg3; \ 62 (void)arg4; \ 63 } while(0) \ 64 65 #endif /* DIS_WARNING_H_ */ 66