Skip to content

Commit e7d6ef0

Browse files
committed
Updated warning/error IDs in manual
1 parent 4d6907d commit e7d6ef0

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

docs/manual/index.html

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -280,16 +280,16 @@ <h1>Asar</h1>
280280
C:/homebrew/my_game/main.asm</code></pre></td>
281281
</tr>
282282
<tr>
283-
<td><code class="powershell">-w{id}</code></td>
283+
<td><code class="powershell">-w{name}</code></td>
284284
<td>Modifier</td>
285-
<td>Enables the warning with the specified ID. See section <a href="#warnings">Warnings</a> for details.</td>
286-
<td><pre><code class="powershell">asar.exe -wW1023 C:/homebrew/my_game/main.asm</code></pre></td>
285+
<td>Enables the warning with the specified name. See section <a href="#warnings">Warnings</a> for details.</td>
286+
<td><pre><code class="powershell">asar.exe -wWmplicitly_sized_immediate C:/homebrew/my_game/main.asm</code></pre></td>
287287
</tr>
288288
<tr>
289-
<td><code class="powershell">-wno{id}</code></td>
289+
<td><code class="powershell">-wno{name}</code></td>
290290
<td>Modifier</td>
291-
<td>Disables the warning with the specified ID. See section <a href="#warnings">Warnings</a> for details.</td>
292-
<td><pre><code class="powershell">asar.exe -wnoW1013 C:/homebrew/my_game/main.asm</code></pre></td>
291+
<td>Disables the warning with the specified name. See section <a href="#warnings">Warnings</a> for details.</td>
292+
<td><pre><code class="powershell">asar.exe -wnoWfreespace_leaked C:/homebrew/my_game/main.asm</code></pre></td>
293293
</tr>
294294
<tr>
295295
<td><code class="powershell">--fix-checksum={on/off}</code></td>
@@ -1581,7 +1581,7 @@ <h4 id="rep">rep</h4>
15811581
<hr />
15821582
<div id="mappers"><h3>Mapping Modes</h3>
15831583
Asar supports a number of different mapping modes. They control the address translation used by Asar during compilation (aka where in the output file Asar writes to). Historically, SNES cartridges used a number of different mappers to address data in ROM. Those mappers can be supported by using the respective mapping mode in Asar. It's possible, but not recommended, to use different mapping modes on the same ROM. Detailed explanations on each mapping mode are beyond the scope of this manual, so please check the SNES Dev Manual or other specialized resources for that.<br/>
1584-
NOTE: Changing the mapper after having previously set it will generate warning <code>W1029</code>.<br/><br/>
1584+
NOTE: Changing the mapper after having previously set it will generate warning <code>Wmapper_already_set</code>.<br/><br/>
15851585
<table>
15861586
<tr>
15871587
<th style="width:150px">Command</th>
@@ -2891,7 +2891,7 @@ <h4 id="if-else">if/elseif/else/endif</h4>
28912891
if FirstLabel == 0
28922892
endif
28932893

2894-
; Error E5107. The label could move between passes.
2894+
; Error Elabel_in_conditional. The label could move between passes.
28952895
if SecondLabel == 0
28962896
endif</code></pre>
28972897
<h4 id="while">while</h4>
@@ -3371,7 +3371,7 @@ <h4 id="check-bankcross">check bankcross</h4>
33713371
<a href="#contents">Return to top</a></div>
33723372
<hr />
33733373
<div id="warnings"><h3>Warnings</h3>
3374-
Warnings are messages that Asar outputs to inform the user about potentially unintended or risky code that isn't critical and thus doesn't cause assembly to fail on its own. These messages can be useful for detecting potential problems in the code, but in some situations may be undesirable. For this reason, Asar supports a few methods of explicitly enabling or disabling certain warnings (see section <a href="#usage">Usage</a> for details on how to configure warnings via the command line). Additionally, there are warnings which may be useful in some situations, but would be intrusive in most other situations. They are disabled by default and have to be enabled explicitly to be used. Commands that enable or disable warnings refer to them via their ID. This ID is in the format <code>WXXXX</code>, where <code>XXXX</code> is a number uniquely identifying a warning. The easiest way of finding the ID for a specific warning is to look at the console output of a patch producing it. Asar will always output the warning ID along with the respective warning.
3374+
Warnings are messages that Asar outputs to inform the user about potentially unintended or risky code that isn't critical and thus doesn't cause assembly to fail on its own. These messages can be useful for detecting potential problems in the code, but in some situations may be undesirable. For this reason, Asar supports a few methods of explicitly enabling or disabling certain warnings (see section <a href="#usage">Usage</a> for details on how to configure warnings via the command line). Additionally, there are warnings which may be useful in some situations, but would be intrusive in most other situations. They are disabled by default and have to be enabled explicitly to be used. Commands that enable or disable warnings refer to them via their names. The easiest way of finding the name of a specific warning is to look at the console output of a patch producing it. Asar will always output the warning name along with the respective warning.
33753375
<h4 id="disabled-warnings">Disabled Warnings</h4>
33763376
This is a list of all warnings that are disabled by default and have to be enabled explicitly.<br/><br/>
33773377
<table>
@@ -3380,11 +3380,11 @@ <h4 id="disabled-warnings">Disabled Warnings</h4>
33803380
<th>Details</th>
33813381
</tr>
33823382
<tr>
3383-
<td><code>W1013</code></td>
3383+
<td><code>Wimplicitly_sized_immediate</code></td>
33843384
<td>Thrown when opcodes are sized implicitly and Asar has to assume a size. An opcode is considered to be sized explicitly when either a length specifier is used or a simple hex constant that can be assumed to be of a specific size (that is, a hex constant with either two or four digits). Opcodes that don't support multiple sizes are always considered to be sized explicitly. Everything else is considered to be sized implicitly and will throw this warning when enabled.</td>
33853385
</tr>
33863386
<tr>
3387-
<td><code>W1024</code></td>
3387+
<td><code>Wcheck_memory_file</code></td>
33883388
<td>Only relevant for the DLL API. Thrown when a file is accessed that was either not provided as a memory file or that isn't found in memory. Mainly intended for debugging purposes and can be used to assure that files are actually read from the correct location.</td>
33893389
</tr>
33903390
</table>
@@ -3393,21 +3393,23 @@ <h4 id="warnings-push-pull">warnings {push/pull}</h4>
33933393
The <code class="65c816_asar">warnings push</code> command pushes the current state of enabled and disabled warnings to the stack. The <code class="65c816_asar">warnings pull</code> command pulls it back from the stack.
33943394
<pre><code class="65c816_asar">warnings push
33953395
; Disable "freespace leaked" warning
3396-
warnings disable W1011
3396+
warnings disable Wfreespace_leaked
33973397

33983398
freecode
33993399

34003400
; [...]
34013401

34023402
warnings pull</code></pre>
34033403
<h4 id="warnings-enable-disable">warnings {enable/disable}</h4>
3404-
<pre><code class="65c816_asar">warnings {enable/disable} {id}</code></pre>
3405-
The <code class="65c816_asar">warnings enable</code> command enables the warning with the specified ID, the <code class="65c816_asar">warnings disable</code> command disables it. Warnings enabled or disabled via this command override warnings enabled or disabled via the command line (see section <a href="#usage">Usage</a> for details). When using these commands inside shared code, it's recommended to do so in conjunction with <a href="#warnings-push-pull">warnings {push/pull}</a> to prevent the modified settings from leaking into other files.
3406-
<pre><code class="65c816_asar">warnings disable W1012
3404+
<pre><code class="65c816_asar">warnings {enable/disable} {name}</code></pre>
3405+
The <code class="65c816_asar">warnings enable</code> command enables the warning with the specified name, the <code class="65c816_asar">warnings disable</code> command disables it. Warnings enabled or disabled via this command override warnings enabled or disabled via the command line (see section <a href="#usage">Usage</a> for details). When using these commands inside shared code, it's recommended to do so in conjunction with <a href="#warnings-push-pull">warnings {push/pull}</a> to prevent the modified settings from leaking into other files.
3406+
<pre><code class="65c816_asar">warnings disable Wwarn_command
34073407

34083408
warn "This text in invisible!"
34093409

3410-
warn enable W1012</code></pre>
3410+
warn enable Wwarn_command
3411+
3412+
warn "This text in visible!"</code></pre>
34113413
<a href="#contents">Return to top</a></div>
34123414
</body>
34133415
</html>

src/asar/interface-cli.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ int main(int argc, const char * argv[])
287287
" Add a define (optionally with a value) to Asar.\n\n"
288288
" -werror \n"
289289
" Treat warnings as errors.\n\n"
290-
" -w<ID> \n"
290+
" -w<name> \n"
291291
" Enable a specific warning.\n\n"
292-
" -wno<ID> \n"
292+
" -wno<name> \n"
293293
" Disable a specific warning.\n\n"
294294
" --full-call-stack\n"
295295
" Enables detailed call stack information for warnings and errors.\n\n"

0 commit comments

Comments
 (0)