这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Fix typedef compilation errors in Flutter CI tool wrapper

This PR fixes clang compilation errors in the Flutter CI tool's native wrapper where typedef alias names were identical to struct names, causing "typedef redefinition with different types" errors.

Problem

The clang compiler was failing with typedef redefinition errors:

/Users/atsushi/sources/midicci/tools/flutter-ci-tool/native/ci_tool_wrapper.h:29:39: error: typedef redefinition with different types ('struct CIDeviceManagerHandle *' vs 'CIDeviceManagerHandle')

Solution

Renamed all typedef aliases to be distinct from their struct names:

  • typedef struct CIToolRepositoryHandle* CIToolRepositoryHandle;typedef struct CIToolRepositoryHandle* CIToolRepository;
  • typedef struct CIDeviceManagerHandle* CIDeviceManagerHandle;typedef struct CIDeviceManagerHandle* CIDeviceManager;
  • typedef struct CIDeviceModelHandle* CIDeviceModelHandle;typedef struct CIDeviceModelHandle* CIDeviceModel;
  • typedef struct MidiDeviceManagerHandle* MidiDeviceManagerHandle;typedef struct MidiDeviceManagerHandle* MidiDeviceManager;

Files Changed

  • tools/flutter-ci-tool/native/ci_tool_wrapper.h - Updated typedef declarations and all function signatures
  • tools/flutter-ci-tool/native/ci_tool_wrapper.cpp - Updated all function implementations to use new typedef names

Verification

Compilation Success: cmake -B build && cmake --build build completes successfully
No typedef errors: Clang no longer reports typedef redefinition errors
Consistent naming: All function signatures updated consistently across header and implementation files

This resolves the compilation issues preventing the Flutter CI tool from building with clang.


Link to Devin run: https://app.devin.ai/sessions/6bfc62593a544e84b097a8d8d38710fa
Requested by: Atsushi Eno (atsushieno@gmail.com)

… conflicts with struct names

- Changed typedef struct CIToolRepositoryHandle* CIToolRepositoryHandle to CIToolRepository
- Changed typedef struct CIDeviceManagerHandle* CIDeviceManagerHandle to CIDeviceManager
- Changed typedef struct CIDeviceModelHandle* CIDeviceModelHandle to CIDeviceModel
- Changed typedef struct MidiDeviceManagerHandle* MidiDeviceManagerHandle to MidiDeviceManager
- Updated all function signatures in both header and implementation files to use new typedef names
- Resolves clang compilation error: typedef redefinition with different types

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@atsushieno atsushieno merged commit 0967f7f into flutter_ui Jun 20, 2025
@atsushieno atsushieno deleted the devin/1750440971-fix-typedef-compilation-errors-v2 branch June 20, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants