33#include <criterion/parameterized.h>
44#include <stdio.h>
55
6- // TODO source path is src!
6+ // TODO(giuliof) source path is src!
77#include "../fdc.h"
88#include "../fdc_registers.h"
99
@@ -22,12 +22,13 @@ static int fake_write(uint8_t *buffer, uint8_t unit_number, bool phy_head,
2222 * @param expected_sr the expected value of the FDC main status register
2323 */
2424static void assert_fdc_sr (uint8_t expected_sr ) {
25- uint8_t sr ;
26- sr = fdc_in (FDC_ADDR_STATUS_REGISTER );
27- // cr_log_info("%x != %x", sr , expected_sr);
28- cr_expect_eq (sr , expected_sr );
25+ uint8_t sreg ;
26+ sreg = fdc_in (FDC_ADDR_STATUS_REGISTER );
27+ // cr_log_info("%x != %x", sreg , expected_sr);
28+ cr_expect_eq (sreg , expected_sr );
2929}
3030
31+ // NOLINTNEXTLINE
3132static int fake_read (uint8_t * buffer , uint8_t unit_number , bool phy_head ,
3233 uint8_t phy_track , bool head , uint8_t track ,
3334 uint8_t sector ) {
@@ -42,6 +43,7 @@ static int fake_read(uint8_t *buffer, uint8_t unit_number, bool phy_head,
4243 return 4 ;
4344}
4445
46+ // NOLINTNEXTLINE
4547static int fake_wrong_rw (uint8_t * buffer , uint8_t unit_number , bool phy_head ,
4648 uint8_t phy_track , bool head , uint8_t track ,
4749 uint8_t sector ) {
@@ -56,6 +58,7 @@ static int fake_wrong_rw(uint8_t *buffer, uint8_t unit_number, bool phy_head,
5658 return DISK_IMAGE_ERR ;
5759}
5860
61+ // NOLINTNEXTLINE
5962static int fake_read_check_track (uint8_t * buffer , uint8_t unit_number ,
6063 bool phy_head , uint8_t phy_track , bool head ,
6164 uint8_t track , uint8_t sector ) {
@@ -173,11 +176,11 @@ Test(ceda_fdc, invalidSeekSequence) {
173176 cr_assert_eq (fdc_getIntStatus (), false);
174177
175178 {
176- uint8_t sr ;
177- sr = fdc_in (FDC_ADDR_STATUS_REGISTER );
179+ uint8_t sreg ;
180+ sreg = fdc_in (FDC_ADDR_STATUS_REGISTER );
178181 // Remove busy drives, not interested
179- sr &= (uint8_t ) ~(FDC_ST_D0B | FDC_ST_D1B | FDC_ST_D2B | FDC_ST_D3B );
180- cr_expect_eq (sr , (FDC_ST_RQM | FDC_ST_DIO | FDC_ST_CB ));
182+ sreg &= (uint8_t ) ~(FDC_ST_D0B | FDC_ST_D1B | FDC_ST_D2B | FDC_ST_D3B );
183+ cr_expect_eq (sreg , (FDC_ST_RQM | FDC_ST_DIO | FDC_ST_CB ));
181184 }
182185
183186 // FDC does not process this command and asserts invalid command
0 commit comments