Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果 SNDRV_CARDS 等于 8,以下宏返回的值是多少
#define SNDRV_DEFAULT_IDX { [0 ... (SNDRV_CARDS-1)] = -1 }
我在驱动程序代码中找到了这个。
那是一个GNU 扩展的指定初始化器。
宏展开的代码是:
{ [0 ... (8-1)] = -1 }
这又是一个由 8 个整数组成的数组,全部设置为 -1。