mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[iso] fix Clang errors
* Clang warnings came from assert being a regular call * created a new cdio_assert_log() call with __attribute__((__noreturn__)) * see http://clang-analyzer.llvm.org/annotations.html#custom_assertions
This commit is contained in:
		
							parent
							
								
									6bf24cbf5d
								
							
						
					
					
						commit
						4565531201
					
				
					 4 changed files with 25 additions and 10 deletions
				
			
		|  | @ -91,7 +91,11 @@ cdio_log_handler_t cdio_log_set_handler (cdio_log_handler_t new_handler); | |||
|  */ | ||||
| void cdio_log (cdio_log_level_t level,  | ||||
|                const char format[], ...) GNUC_PRINTF(2, 3); | ||||
|      | ||||
| #if defined(__GNUC__) | ||||
| /* See http://clang-analyzer.llvm.org/annotations.html#custom_assertions */ | ||||
| void cdio_assert_log (const char format[], ...) | ||||
|                GNUC_PRINTF(1, 2) __attribute__((__noreturn__)); | ||||
| #endif | ||||
| /**
 | ||||
|  * Handle a debugging message. | ||||
|  * | ||||
|  |  | |||
|  | @ -31,15 +31,14 @@ | |||
| 
 | ||||
| #define cdio_assert(expr) \ | ||||
|  { \ | ||||
|    if (GNUC_UNLIKELY (!(expr))) cdio_log (CDIO_LOG_ASSERT, \ | ||||
|    if (GNUC_UNLIKELY (!(expr))) cdio_assert_log ( \ | ||||
|      "file %s: line %d (%s): assertion failed: (%s)", \ | ||||
|      __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr); \ | ||||
|  } | ||||
| 
 | ||||
| #define cdio_assert_not_reached() \ | ||||
|  { \ | ||||
|    cdio_log (CDIO_LOG_ASSERT, \ | ||||
|      "file %s: line %d (%s): should not be reached", \ | ||||
|    cdio_assert_log ("file %s: line %d (%s): should not be reached", \ | ||||
|      __FILE__, __LINE__, __PRETTY_FUNCTION__); \ | ||||
|  } | ||||
| 
 | ||||
|  |  | |||
|  | @ -119,6 +119,18 @@ cdio_log (cdio_log_level_t level, const char format[], ...) | |||
|   va_end (args); | ||||
| } | ||||
| 
 | ||||
| #if defined(__GNUC__) | ||||
| void | ||||
| cdio_assert_log (const char format[], ...) | ||||
| { | ||||
|   va_list args; | ||||
|   va_start (args, format); | ||||
|   cdio_logv (CDIO_LOG_ASSERT, format, args); | ||||
|   va_end (args); | ||||
|   exit(1); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| #define CDIO_LOG_TEMPLATE(level, LEVEL) \ | ||||
| void \ | ||||
| cdio_ ## level (const char format[], ...) \ | ||||
|  |  | |||
							
								
								
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL | |||
| IDD_DIALOG DIALOGEX 12, 12, 206, 278 | ||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||
| EXSTYLE WS_EX_APPWINDOW | ||||
| CAPTION "Rufus v1.0.7.124" | ||||
| CAPTION "Rufus v1.0.7.125" | ||||
| FONT 8, "MS Shell Dlg", 400, 0, 0x1 | ||||
| BEGIN | ||||
|     DEFPUSHBUTTON   "Start",IDC_START,94,236,50,14 | ||||
|  | @ -69,7 +69,7 @@ BEGIN | |||
|     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP | ||||
|     CONTROL         "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, | ||||
|                     "SysLink",WS_TABSTOP,46,47,114,9 | ||||
|     LTEXT           "Version 1.0.7 (Build 124)",IDC_STATIC,46,19,78,8 | ||||
|     LTEXT           "Version 1.0.7 (Build 125)",IDC_STATIC,46,19,78,8 | ||||
|     PUSHBUTTON      "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP | ||||
|     EDITTEXT        IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL | ||||
|     LTEXT           "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 | ||||
|  | @ -207,8 +207,8 @@ END | |||
| // | ||||
| 
 | ||||
| VS_VERSION_INFO VERSIONINFO | ||||
|  FILEVERSION 1,0,7,124 | ||||
|  PRODUCTVERSION 1,0,7,124 | ||||
|  FILEVERSION 1,0,7,125 | ||||
|  PRODUCTVERSION 1,0,7,125 | ||||
|  FILEFLAGSMASK 0x3fL | ||||
| #ifdef _DEBUG | ||||
|  FILEFLAGS 0x1L | ||||
|  | @ -225,13 +225,13 @@ BEGIN | |||
|         BEGIN | ||||
|             VALUE "CompanyName", "akeo.ie" | ||||
|             VALUE "FileDescription", "Rufus" | ||||
|             VALUE "FileVersion", "1.0.7.124" | ||||
|             VALUE "FileVersion", "1.0.7.125" | ||||
|             VALUE "InternalName", "Rufus" | ||||
|             VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" | ||||
|             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" | ||||
|             VALUE "OriginalFilename", "rufus.exe" | ||||
|             VALUE "ProductName", "Rufus" | ||||
|             VALUE "ProductVersion", "1.0.7.124" | ||||
|             VALUE "ProductVersion", "1.0.7.125" | ||||
|         END | ||||
|     END | ||||
|     BLOCK "VarFileInfo" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue