小编Iva*_*ich的帖子

按大小查找文件更多MIN和更少MAX

我如何使用linux find命令搜索更多MIN和更少MAX的搜索文件

我尝试使用以下命令:

find . -type f -a -size +1000 -a -size -1100
Run Code Online (Sandbox Code Playgroud)

但它不起作用

linux bash gnu-findutils

12
推荐指数
1
解决办法
6649
查看次数

为什么在初始化函数指针数组时会出现"警告"?

我尝试初始化一个函数指针数组,我有"警告":

ring-buffer.c:57:19: warning: assignment from incompatible pointer type [enabled by default]
RBufP->rbfunc[0] = &RBufPush;
                 ^
Run Code Online (Sandbox Code Playgroud)

但邻居还可以:

/*typedef for func pointer*/
typedef RBRetCod_t (*RBFunc)();

/*RBufP*/
typedef struct {
    RBufSiz_t size; /*size and mask*/
    RBufDat_t rbufdat;
    RBufPoint_t head, tail;
    RBFunc rbfunc[3]; /*announce of function pointers array*/
} RBuf_t;
RBuf_t *RBufP;
...

/*init for func pointers array*/
RBufP->rbfunc[2] = &RBufDel; /*it is ok*/
RBufP->rbfunc[1] = &RBufPull; /*it is ok*/
RBufP->rbfunc[0] = &RBufPush; /*it is bad, why???*/

...

/*body of the functions*/
RBRetCod_t RBufPull(unsigned …
Run Code Online (Sandbox Code Playgroud)

c arrays pointers function-pointers function

9
推荐指数
2
解决办法
127
查看次数

vim使用"cscope find s"命令并在新选项卡而不是窗口中打开结果

我使用cscope命令:cs find s someFunction,我看到具有此功能外观的长列表,我发现我对列表感兴趣并打开它,vim在新窗口中打开文件,我想在新选项卡中打开文件.

我发现了几个类似的问题,但他们没有帮助.例如:

vim:在新标签页中打开标签

我如何从cscope标签列表中打开新标签页

vi vim cscope vim-plugin

3
推荐指数
1
解决办法
2523
查看次数

glibc 编译错误:错误:'__EI___errno_location' 指定的属性限制少于其目标'

帮我找出我尝试编译 glibc 2.24 时出现的错误,但出现以下错误:

 ./../include/libc-symbols.h:413:26: error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location': 'const', 'nothrow' [-Werror=missing-attributes]
|   413 |   extern __typeof (name) __EI_##name \
|       |                          ^~~~~
| ./../include/libc-symbols.h:417:29: note: in expansion of macro '__hidden_ver1'
|   417 | #  define hidden_def(name)  __hidden_ver1(__GI_##name, name, name);
|       |                             ^~~~~~~~~~~~~
| ./../include/libc-symbols.h:468:32: note: in expansion of macro 'hidden_def'
|   468 | # define libc_hidden_def(name) hidden_def (name)
|       |                                ^~~~~~~~~~
| errno-loc.c:28:1: note: in expansion of macro 'libc_hidden_def'
|    28 | libc_hidden_def …
Run Code Online (Sandbox Code Playgroud)

c gcc glibc pragma

1
推荐指数
1
解决办法
2047
查看次数

标签 统计

c ×2

arrays ×1

bash ×1

cscope ×1

function ×1

function-pointers ×1

gcc ×1

glibc ×1

gnu-findutils ×1

linux ×1

pointers ×1

pragma ×1

vi ×1

vim ×1

vim-plugin ×1